https://github.com/bbqsrc/fastvlq
A fast variant of Variable-Length Quantity with a focus on speed and no_std support.
https://github.com/bbqsrc/fastvlq
no-std rust u64 varint vlq
Last synced: 9 months ago
JSON representation
A fast variant of Variable-Length Quantity with a focus on speed and no_std support.
- Host: GitHub
- URL: https://github.com/bbqsrc/fastvlq
- Owner: bbqsrc
- License: apache-2.0
- Created: 2020-10-08T21:04:01.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2021-08-31T09:37:28.000Z (over 4 years ago)
- Last Synced: 2025-03-01T21:16:20.205Z (10 months ago)
- Topics: no-std, rust, u64, varint, vlq
- Language: Rust
- Homepage: https://docs.rs/fastvlq/
- Size: 42 KB
- Stars: 5
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Awesome Lists containing this project
README
# fastvlq
[](https://github.com/bbqsrc/fastvlq/actions)
[](https://docs.rs/fastvlq)
Encode and decode with a variant of [variable-length quantity](https://en.wikipedia.org/wiki/Variable-length_quantity) data.
The algorithm uses leading zeros to count how many bytes are required for decoding.
## Usage
Add this to your `Cargo.toml`:
```toml
[dependencies]
fastvlq = "1"
```
## Where is this used?
* [box](https://github.com/bbqsrc/box) - a modern replacement for the zip file format
## License
Licensed under either of
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
* MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)
at your option.