Skip to main content

Module header

Module header 

Source
Expand description

Segment file header and footer structures.

Every .csx segment file begins with a SegmentHeader and ends with a SegmentFooter. The footer contains the CRC32c checksum of the entire file (minus the footer itself) for integrity verification.

§Format Versioning

The header contains a version: u16 field (bytes 4–5, after the 4-byte magic CXSG). The current format version is VERSION.

On read, SegmentHeader::from_bytes requires version == VERSION exactly — a file from a newer writer or an older one is refused with SegmentError::UnsupportedVersion.

Accepting an older version would be silent corruption rather than compatibility: v2 named its time column timestamp and v3 names it _time, so a v2 file opened by a v3 reader yields a batch with a column nothing looks for — no error, no rows. Chronix is pre-release and there is no data in the wild, so the reader refuses instead of translating.

Structs§

SegmentFooter
Segment file footer.
SegmentHeader
Segment file header.

Constants§

FOOTER_SIZE
Size of the serialized footer in bytes.
HEADER_SIZE
Size of the serialized header in bytes.
MAGIC
Segment file magic bytes: CXSG.
VERSION
Current segment format version.