Expand description
Binary serialization infrastructure for NanoTDF
This module provides traits and utilities for reading and writing binary data in the NanoTDF format. All multi-byte integers use big-endian byte order as specified in the NanoTDF specification.
Re-exports§
pub use traits::BinaryRead;pub use traits::BinaryWrite;
Modules§
- traits
- Traits for binary serialization and deserialization
Functions§
- read_
bytes - Read exactly n bytes from a reader
- read_u8
- Read a u8 from a reader
- read_
u16_ be - Read a u16 (big-endian) from a reader
- read_
u24_ be - Read a u24 (big-endian, 3 bytes) from a reader Returns as u32 since Rust doesn’t have a u24 type
- read_
u32_ be - Read a u32 (big-endian) from a reader
- write_
bytes - Write bytes to a writer
- write_
u8 - Write a u8 to a writer
- write_
u16_ be - Write a u16 (big-endian) to a writer
- write_
u24_ be - Write a u24 (big-endian, 3 bytes) to a writer Takes u32 but only writes the lower 24 bits
- write_
u32_ be - Write a u32 (big-endian) to a writer