Skip to main content

frame_length

Function frame_length 

Source
pub fn frame_length(prefix: &[u8]) -> Result<usize, Error>
Expand description

Checks the seven-byte prefix and returns the full frame length, capped at 16 MiB, before a caller allocates or fetches its payload. Extra supplied bytes are ignored here; Object::decode requires exactly one complete frame.