Add header struct and functions.
Add index structs and functions.
Add entry structs and functions.
Add writer functions.