Skip to main content

Module codec

Module codec 

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

FrameError

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
frame_len_from_header