Expand description
CRSH binary file format serialization/deserialization.
§File Layout
Offset 0: FileHeader (64 bytes)
Offset 64: Block 0 — BlockHeader (16 bytes) + payload (compressed_size bytes)
... Block N-1
Offset X: IndexHeader (8 bytes)
Offset X+8: BlockIndexEntry[0..N] (20 bytes each)
Offset X+8+20N: FileFooter (24 bytes) ← last 24 bytes of fileStructs§
- Block
Flags - Per-block bitfield flags stored in the block header.
- Block
Header - Fixed 16-byte header preceding each compressed block’s payload.
- Block
Index Entry - One entry in the trailing block index.
- Engine
Version - Packed 8-byte semantic version of the producing engine.
- File
Flags - Bitfield flags stored in the file header.
- File
Footer - Fixed 24-byte record at the very end of every CRSH file.
- File
Header - Fixed 64-byte header at the start of every CRSH file.
- Index
Header - 8-byte header immediately before the block index entries.
Constants§
- CRSH_
MAGIC - CRSH magic bytes: ASCII “CRSH”
- ENGINE_
VERSION_ STR - Current engine semantic version (set at build time).
- FORMAT_
VERSION - Current format version. Files with a different version are rejected.