#binary #stream #decode #serialize #deserialize

tbon

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

11 releases

0.3.5 Jul 14, 2021
0.3.4 Jul 14, 2021
0.2.2 May 31, 2021
0.1.4 Apr 8, 2021
0.1.3 Mar 23, 2021

#519 in Encoding

46 downloads per month
Used in 6 crates (3 directly)

Apache-2.0

60KB
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:

# use bytes::Bytes;
# use futures::executor::block_on;
let expected = ("one".to_string(), 2.0, vec![3, 4], Bytes::from(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–3MB
~56K SLoC