Expand description
Bounds-checked little-endian readers (the Paranoid Gatekeeper standard).
ReFS is a little-endian on-disk format (Windows/NT platform), so these
mirror xfs-core’s big-endian helpers with LE decode. Every reader yields
0 when the requested range lies outside the buffer, so a malformed or
truncated image can never panic a parser. Callers that need to distinguish
“field absent” from “field is zero” bounds-check the buffer length up front
and surface crate::RefsError::Truncated.
Functions§
- ascii
- Best-effort ASCII rendering of a byte slice — printable ASCII kept, every
other byte shown as
.. Used to render the offending value legibly in fail-loud “unrecognized signature” errors (show the unrecognized value). - le_u16
- Read a little-endian
u16atoff, or0if out of range. - le_u32
- Read a little-endian
u32atoff, or0if out of range. - le_u64
- Read a little-endian
u64atoff, or0if out of range. - u8_at
- Read a single byte at
off, or0if out of range.