Skip to main content

Module codec

Module codec 

Source
Expand description

Raw and zstd chunk payload encoding. Chunk payload codecs shared by Tetration and Tessera.

Wire tags: 0 = raw (stored_byte_len == raw_byte_len), 1 = zstd (frame that decompresses to raw_byte_len bytes).

Decoding validates the logical length recorded by the caller. It does not validate file offsets or stored spans; use crate::le before passing a slice into decode.

Enums§

CodecError
Failures while selecting, encoding, or decoding a payload codec.
PayloadCodec
Payload storage codec represented as a u32 on disk.

Functions§

decode
Decode stored chunk bytes to uncompressed payload (raw_byte_len bytes).
encode
Encode uncompressed bytes using the selected wire codec.