Expand description
Fast vint u32 encoding for rust. Uses at most 5 bytes.
§Examples
use vint32::encode_varint_into;
let mut output = vec![];
encode_varint_into(&mut output, 50);
assert_eq!(output.len(), 1);
Modules§
Functions§
- decode_
from_ reader - Decode a single
vint32-encoded unsigned 32-bit integer from aRead. - decode_
varint - Decode a
vint32-encoded unsigned 32-bit integer from an iterator. Maximum space required are 5 bytes. - decode_
varint_ slice - Decode a
vint32-encoded unsigned 32-bit integer from a bytes slice. Maximum space required are 5 bytes.poswill be used to access the pos in the slice.poswill be incremented by the number of bytes used to dencode the u32. - encode_
varint_ into vint32encode a unsigned 32-bit integer into a vec.- encode_
varint_ into_ writer vint32encode a unsigned 32-bit integer into a vec.