Expand description
Hand-rolled binary codec for v2 frames. No serde — the on-wire shape is fixed by ADR 0001, kept simple so a hex-dump is readable.
Enums§
Constants§
- MAX_
DECOMPRESSED_ PAYLOAD - Upper bound on the inflated size of a COMPRESSED payload. Four times the on-wire frame cap: enough headroom for compression to be useful, small enough that a hostile peer cannot exhaust memory with one frame.
Functions§
- decode_
frame - decode_
frame_ parts - encode_
frame - encode_
uncompressed_ frame_ into - Append an uncompressed frame to caller-owned capacity. Callers can reserve
and admit the complete allocation before encoding. Compression has its own
codec workspace and must use
encode_frameinstead. - frame_
len_ from_ header