Expand description
Byte-size parsing, display, and integer encoding helpers.
The module handles human-readable sizes alongside fixed-width big-endian counters. Its size deserializers integrate human-readable values with Serde.
Functions§
- deserialize_
bytesize_ u64 - Accepts an integer byte count or a string with SI/IEC suffix (e.g. “32 MiB”)
and returns a
u64. - deserialize_
bytesize_ usize - Accepts an integer byte count or a string with SI/IEC suffix (e.g. “24 MiB”)
and returns a
usize. - from_
str - Parse a human-writable size string w/ si-unit suffix into integer
- increment
- Increments an optional big-endian counter with wrapping arithmetic.
- pretty
- Output a human-readable size string w/ iec-unit suffix
- u64_
from_ bytes - Parses the big-endian bytes into an u64.
- u64_
from_ u8 - Parses 8 big-endian bytes into an u64; panic on invalid argument