#binary-encoding #serialization #binary-format #binary-data #binary #deserialize #stream

tbon

TinyChain Binary Object Notation is a compact and versatile stream-friendly binary serialization format

19 releases

new 0.7.0 Feb 17, 2025
0.6.0 Aug 13, 2024
0.5.2 Dec 20, 2023
0.5.1 Sep 3, 2023
0.1.3 Mar 23, 2021

#1632 in Asynchronous

22 downloads per month
Used in 16 crates (6 directly)

Apache-2.0

65KB
2K SLoC

Tinychain Binary Object Notation

Tinychain Binary Object Notation (TBON) is a compact and versatile stream-friendly binary serialization format.

Example:

let expected = ("one".to_string(), 2.0, vec![3, 4], Bytes::from(vec![5u8]));
let stream = tbon::en::encode(&expected).unwrap();
let actual = tbon::de::try_decode((), stream).await.unwrap();
assert_eq!(expected, actual);

lib.rs:

Library for encoding Rust program data into a binary stream, and decoding that stream.

Example:

let expected = ("one".to_string(), 2.0, vec![3, 4], vec![5u8]);
let stream = tbon::en::encode(&expected).unwrap();
let actual = block_on(tbon::de::try_decode((), stream)).unwrap();
assert_eq!(expected, actual);

Dependencies

~1.7–8MB
~67K SLoC