#leb128 #io #vbyte #binary-encoding

binout

The library for binary serialization/deserialization of integers and arrays of integers

6 releases

0.3.1 Sep 10, 2025
0.3.0 Oct 2, 2024
0.2.1 Feb 24, 2024
0.2.0 May 19, 2023
0.1.1 Jul 13, 2022

#543 in Encoding

Download history 5067/week @ 2025-10-05 3147/week @ 2025-10-12 3219/week @ 2025-10-19 7239/week @ 2025-10-26 3735/week @ 2025-11-02 3869/week @ 2025-11-09 5547/week @ 2025-11-16 6704/week @ 2025-11-23 6946/week @ 2025-11-30 6893/week @ 2025-12-07 6994/week @ 2025-12-14 2306/week @ 2025-12-21 2054/week @ 2025-12-28 6009/week @ 2026-01-04 4752/week @ 2026-01-11 4756/week @ 2026-01-18

17,899 downloads per month
Used in 15 crates (5 directly)

MIT/Apache

16KB
267 lines

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).

Example

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);

No runtime deps