6 releases (3 stable)
Uses old Rust 2015
| 2.0.0 | Jun 10, 2017 |
|---|---|
| 1.0.1 | Feb 25, 2016 |
| 0.4.0 | Feb 25, 2016 |
| 0.3.1 | Feb 25, 2016 |
| 0.3.0 | Feb 25, 2016 |
#6 in #length-prefixed
10KB
193 lines
Read/Write traits for reading common formats like length-prefixed packets.
rwutils handles a few common formats of binary data:
- C-style strings, that is 0-terminated sequences of non-zero bytes inside
the
bytes0module. Check its docs for examples of reading Strings. - Length prefixed packets, a u8/u16/u32/u64 of the number of bytes to
read, followed by the actual data. See
length_prefix.
All readers are implemented as additional traits for the io::Read and
io::Write. After using them, additional methods become available on these
types.
Please read the notes regarding security in module as well, especially if you are handling untrusted user input.
Dependencies
~125KB