Function stream_vbyte::encode [] [src]

pub fn encode<E: Encoder>(input: &[u32], output: &mut [u8]) -> usize

Encode the input slice into the output slice.

If you don't have specific knowledge of the input that would let you determine the encoded length ahead of time, make output 5x as long as input. The worst-case encoded length is 4 bytes per u32 plus another byte for every 4 u32s, including any trailing partial 4-some.

Returns the number of bytes written to the output slice.