#leb128 #vbyte #io #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

#437 in Encoding

Download history 5616/week @ 2026-01-02 4933/week @ 2026-01-09 4473/week @ 2026-01-16 5442/week @ 2026-01-23 6030/week @ 2026-01-30 5897/week @ 2026-02-06 8456/week @ 2026-02-13 6631/week @ 2026-02-20 8433/week @ 2026-02-27 13773/week @ 2026-03-06 8264/week @ 2026-03-13 6594/week @ 2026-03-20 9378/week @ 2026-03-27 8282/week @ 2026-04-03 8980/week @ 2026-04-10 7795/week @ 2026-04-17

35,625 downloads per month
Used in 29 crates (6 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