23 stable releases (6 major)

9.1.0 Jun 12, 2024
8.3.0 Jan 18, 2024
8.1.0 Jun 12, 2023
7.0.0 Jun 4, 2023
3.0.2 Jul 19, 2022

#1618 in Encoding

Download history 1734/week @ 2024-08-14 2426/week @ 2024-08-21 1864/week @ 2024-08-28 1406/week @ 2024-09-04 1823/week @ 2024-09-11 2118/week @ 2024-09-18 2102/week @ 2024-09-25 2303/week @ 2024-10-02 2796/week @ 2024-10-09 2785/week @ 2024-10-16 2310/week @ 2024-10-23 2274/week @ 2024-10-30 2909/week @ 2024-11-06 2881/week @ 2024-11-13 1657/week @ 2024-11-20 998/week @ 2024-11-27

8,872 downloads per month
Used in 27 crates (10 directly)

MIT license

70KB
1.5K SLoC

Binary Stream

A binary stream reader and writer.

Credits

Derived from the binary_rw crate.


lib.rs:

Read and write binary data to streams.

An asynchronous version using futures::io is available using the async feature.

Strings are length prefixed using u32 by default, use the 64bit feature if you really need huge strings.

Encode and decode implementations are provided for all primitive types and blanket implementations for Option<T> and Vec<T>; the blank implementation for Vec<T> is length prefixed using a u32 so will panic if it is longer than u32::MAX.

Dependencies

~245KB