Skip to main content

encode

Function encode 

Source
pub fn encode(input: &[u8]) -> (ValueFlag, Vec<u8>)
Expand description

Encode input for storage. Returns the flag indicating which representation is stored, plus the bytes themselves. When LZ4 would not shrink the input (including the 4-byte length header), the codec returns (Raw, input.to_vec()) — never a longer payload.