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

#342 in Encoding

Download history 1560/week @ 2024-04-04 1337/week @ 2024-04-11 1297/week @ 2024-04-18 1635/week @ 2024-04-25 1633/week @ 2024-05-02 1389/week @ 2024-05-09 1499/week @ 2024-05-16 1789/week @ 2024-05-23 2026/week @ 2024-05-30 2939/week @ 2024-06-06 2584/week @ 2024-06-13 1467/week @ 2024-06-20 1610/week @ 2024-06-27 1577/week @ 2024-07-04 2074/week @ 2024-07-11 1669/week @ 2024-07-18

7,212 downloads per month
Used in 15 crates (7 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

~0–255KB