Expand description
Utility crate for Deku
that provides convenient support for serializing and
deserializing String and Vec in a variety of binary formats.
Some notable features:
StringDeku
supports UTF-8, UTF-16 and UTF-32 encodings.- Multiple layouts such as .Net, Pascal and zero-ended.
- Little and Big Endian support.
- Dynamic read and write without additional temporary structs and operations.
- No need to specify custom reader and writer functions.
- Compatible with Deku’s derive macros and custom readers/writers.
- Supports
serde
anddefmt
.
Read specific struct for example usage.
Structs§
- Seven
BitU8 - Variable length 7-bit encoded u8.
- Seven
BitU16 - Variable length 7-bit encoded u16.
- Seven
BitU32 - Variable length 7-bit encoded u32.
- Seven
BitU64 - Variable length 7-bit encoded u64.
- Seven
BitU128 - Variable length 7-bit encoded u128.
- String
Deku - Thin wrapper around
alloc::string::String
to read and write in various layouts. - VecDeku
- Thin wrapper around
alloc::vec::Vec<T>
to read and write in various layouts.
Enums§
- Encoding
- String encoding to use.
- Size
- Size encoding for length-prefixed
StringDeku
andVecDeku
- String
Layout - Supported string binary layouts.
- VecLayout
- Supported vec binary layouts.