Skip to content
/ msb128 Public

std::io::{Read, Write} positive, primitive Rust integers in the Most Significant Base 128 (MSB128) variable-length encoding.

Notifications You must be signed in to change notification settings

0xB10C/msb128

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

crates.io Docs badge Build Status

msb128

std::io::{Read, Write} positive, primitive Rust integers in the Most Significant Base 128 (MSB128) variable-length encoding.

MSB128 is also known as Variable Length Quantity (VLQ) encoding and similar to the Little Endian Base 128 (LEB128) encoding (other endianness).

Each byte is encoded into 7 bits, and one is subtracted (excluding the last byte). The highest bit indicates if more bytes follow. Reading stops after a byte with the highest bit set is read or if the underlying Rust primitive overflows.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

std::io::{Read, Write} positive, primitive Rust integers in the Most Significant Base 128 (MSB128) variable-length encoding.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages