pub fn decode_header(buf: &[u8]) -> Result<DbHeader>Expand description
Decodes the header from a PAGE_SIZE-sized buffer. Returns an error if
magic bytes, format version, or page size don’t match what we wrote.
V4, V5, and V6 are accepted; the result’s format_version echoes
what was on disk so a no-op resave preserves it. freelist_head is
read from bytes [28..32] for V6 files; V4/V5 files have a zero
reserved region there, so the field decodes as 0 either way.