Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/0xb10c/msb128
std::io::{Read, Write} positive, primitive Rust integers in the Most Significant Base 128 (MSB128) variable-length encoding.
https://github.com/0xb10c/msb128
Last synced: about 5 hours ago
JSON representation
std::io::{Read, Write} positive, primitive Rust integers in the Most Significant Base 128 (MSB128) variable-length encoding.
- Host: GitHub
- URL: https://github.com/0xb10c/msb128
- Owner: 0xB10C
- Created: 2020-11-07T12:04:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2020-11-08T08:07:42.000Z (about 4 years ago)
- Last Synced: 2024-08-10T06:13:49.031Z (6 months ago)
- Language: Rust
- Size: 4.88 KB
- Stars: 2
- Watchers: 3
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
![crates.io](https://img.shields.io/crates/v/msb128.svg)
[![Docs badge]][docs.rs]
[![Build Status](https://travis-ci.com/0xB10C/msb128.svg?branch=main)](https://travis-ci.com/0xB10C/msb128)[Docs badge]: https://img.shields.io/badge/docs.rs-rustdoc-green
[docs.rs]: https://docs.rs/msb128/# 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).[Variable Length Quantity]: https://en.wikipedia.org/wiki/Variable-length_quantity
[Little Endian Base 128]: https://en.wikipedia.org/wiki/LEB128Each 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
* 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.
## 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.