Expand description
FAFB Header Implementation
The 32-byte header that identifies and describes a .fafb file.
Layout:
Offset Size Field
------ ---- -----
0 4 magic (b"FAFB")
4 1 version_major
5 1 version_minor
6 2 flags
8 4 source_checksum (CRC32)
12 8 created_timestamp (Unix)
20 2 section_count
22 4 section_table_offset
26 2 reserved
28 4 total_size
------ ----
Total: 32 bytesStructs§
- Fafb
Header - The 32-byte FAFB file header
Constants§
- HEADER_
SIZE - Header size in bytes
- MAGIC
- Magic number identifying FAFB files: “FAFB” in ASCII
- MAGIC_
U32 - Magic number as u32 (little-endian)
- MAX_
FILE_ SIZE - Maximum allowed file size (DoS protection): 10MB
- MAX_
SECTIONS - Maximum allowed section count (DoS protection)
- VERSION_
MAJOR - Current format major version (breaking changes)
- VERSION_
MINOR - Current format minor version (additive changes)