| Crates.io | binout |
| lib.rs | binout |
| version | 0.3.1 |
| created_at | 2022-07-11 20:03:20.897751+00 |
| updated_at | 2025-09-10 14:33:14.194058+00 |
| description | The library for binary serialization/deserialization of integers and arrays of integers. |
| homepage | |
| repository | https://github.com/beling/bsuccinct-rs |
| max_upload_size | |
| id | 623978 |
| size | 15,971 |
binout is the Rust library by Piotr Beling for low-level, portable, bytes-oriented,
binary encoding, decoding, serialization, deserialization of integers and arrays of integers.
It supports slightly improved VByte/LEB128 format (see [VByte]) as well as simple, little-endian, as-is serialization (see [AsIs]).
use binout::{VByte, Serializer};
let value = 123456u64;
let mut buff = Vec::new();
assert!(VByte::write(&mut buff, value).is_ok());
assert_eq!(buff.len(), VByte::size(value));
let read: u64 = VByte::read(&mut &buff[..]).unwrap();
assert_eq!(read, value);