msb128 0.1.0

std::io::{Read, Write} positive primitive Rust integers in the Most Significant Base 128 (MSB128) variable-length encoding.
Documentation
  • Coverage
  • 100%
    9 out of 9 items documented2 out of 4 items with examples
  • Size
  • Source code size: 12.98 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.85 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 13s Average build duration of successful builds.
  • all releases: 13s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • 0xB10C/msb128
    1 3 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • 0xB10C

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.