binary_address_book
binary address book from text manipulation chapter
Address Book Fields
Things to store
- First name(s)
- Last name
- Street Address
- City
- State/Province
- Post Code
- Phone Number
- 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
- Magic 0xDB
- u4 major
- u4 minor version
- u16 reserved
- u32 record count
Record Header
- u8 field count
- u8 length - not including header
- 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
Languages
Rust
100%