Skip to main content

Module format

Module format 

Source
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 file

Structs§

BlockFlags
Per-block bitfield flags stored in the block header.
BlockHeader
Fixed 16-byte header preceding each compressed block’s payload.
BlockIndexEntry
One entry in the trailing block index.
EngineVersion
Packed 8-byte semantic version of the producing engine.
FileFlags
Bitfield flags stored in the file header.
FileFooter
Fixed 24-byte record at the very end of every CRSH file.
FileHeader
Fixed 64-byte header at the start of every CRSH file.
IndexHeader
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.