2020-11-10 16:19:59 -07:00
2020-11-10 10:08:10 -07:00
2020-11-10 15:43:38 -07:00
2020-11-10 16:19:59 -07:00
2020-11-10 10:06:12 -07:00
2020-11-10 10:07:25 -07:00
2020-11-10 10:56:31 -07:00
2020-11-10 10:31:56 -07:00

binary_address_book

binary address book from text manipulation chapter

Address Book Fields

Things to store

  1. First name(s)
  2. Last name
  3. Street Address
  4. City
  5. State/Province
  6. Post Code
  7. Phone Number
  8. Extra

There can be any number of extras

Binary Format

The binary format for the address book starts with a DB Header. Immediately following the DB Header is the first record header. Each record header is followed by the number of field headers indicated by the field count.

DB Header

  1. Magic 0xDB
  2. u4 major
  3. u4 minor version
  4. u16 reserved
  5. u32 record count

Record Header

  1. u8 field count
  2. u8 length - not including header
  3. u16 crc16-arc - not including header

022094A6

Field

Hex 0100034a6f6e020006fa616e78a656e

Field 1 - First Name(s)
Length 3
Jon
Field 2 - Last Name
Length 6
Janzen
Description
binary address book from text manipulation chapter
Readme 28 KiB
Languages
Rust 100%