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

#1631 in Encoding

Download history 1839/week @ 2024-07-22 2063/week @ 2024-07-29 1950/week @ 2024-08-05 1767/week @ 2024-08-12 1913/week @ 2024-08-19 2547/week @ 2024-08-26 1342/week @ 2024-09-02 1546/week @ 2024-09-09 2070/week @ 2024-09-16 2082/week @ 2024-09-23 2178/week @ 2024-09-30 2864/week @ 2024-10-07 2653/week @ 2024-10-14 2540/week @ 2024-10-21 2185/week @ 2024-10-28 2777/week @ 2024-11-04

10,209 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

~245KB