Skip to main content

encode_framed

Function encode_framed 

Source
pub fn encode_framed(data: &[u8]) -> Vec<u8> 
Expand description

Encode data into a framed payload: [flags: u8] [body...]

If data is >= COMPRESSION_THRESHOLD bytes and compresses smaller, the body is zstd-compressed and FLAG_COMPRESSED is set.