Crate varmint [] [src]

A Rust implementation of the varint format as used in Google's Protocol Buffers. Adds read_*/write_* methods for various sizes of varints on top of the standard IO traits.

Traits

ReadVarInt

A trait to allow reading integers from a byte-oriented source that were encoded in the varint format defined by Google's Protocol Buffer standard.

WriteVarInt

A trait to allow writing integers to a byte-oriented sink in the varint format defined by Google's Protocol Buffer standard.

Functions

len_u64_varint

Returns the number of bytes that would be used to encode the given value as a varint.

len_usize_varint

Returns the number of bytes that would be used to encode the given value as a varint.