vli 0.1.0

Variable length integer encoding and decoding
Documentation
  • Coverage
  • 0%
    0 out of 14 items documented0 out of 0 items with examples
  • Size
  • Source code size: 6.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.34 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 15s Average build duration of successful builds.
  • all releases: 15s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Le0X8/vli
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • Le0X8

Variable length integer (VLI) decoding in Rust

This crate provides simple functionality to read variable length integers from binary sources that implement the Read trait. It supports different endianness options for multi-byte reads.

This crate provides:

  • functions to read
    • unsigned 8-128-bit variable length integers in little-endian, big-endian, and native-endian formats

Planned features:

  • support for signed integers
  • write support

Usage

You shouldn't use this crate directly, as using it through the dh crate with the vli feature enabled will make things A LOT easier for you and does use a more object-oriented approach directly on Read and Write trait objects.

Also, the dh crate handles a lot of other things that you might need when dealing with binary data, and can read variable length integers at specific positions if Seek is also implemented, so prefer using dh unless you have a specific reason not to ;)

# recommended
cargo add dh -F vli

# not recommended
cargo add vli

License

This project is licensed under the MIT License. See the LICENSE file for details.