encode

Function encode 

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

Encode a sequence of u32 integers into a vbyte encoded byte representation. Internally a buffer of length max_compressedbytes is allocated to store the compressed result.

The buffer will be truncated to the correct length before returning.

§Examples

use streamvbyte::encode;
let out_bytes: Vec<u8> = encode(&[1,2,44,5123,43,534]);

§Return

Returns the encoded output as a byte buffer