Crate stream_vbyte [] [src]

Encode and decode u32s with the Stream VByte format.

Functions

decode

Decode count numbers from input, appending them to output. The count must be the same as the number of items originally encoded. Returns the number of bytes read from input.

encode

Encode the input slice into the output slice. The worst-case encoded length is 4 bytes per u32 plus another byte for every 4 u32s, including a trailing partial 4-some. Returns the number of bytes written to the output slice.