Expand description
Bounds-checked, zero-copy byte access.
Every container parser works on &[u8] slices of the (usually memory-mapped)
input. All offset arithmetic is checked: a malformed offset yields
Error::CorruptFile instead of a panic or out-of-bounds read.
Structs§
- Cursor
- A sequential cursor over a byte slice.
Enums§
- Byte
Order - Byte order of multi-byte integers.
Traits§
- ReadAt
- Random-access endian-aware reads on a byte slice.
Functions§
- ascii_
field - Decode a fixed-length, NUL-padded ASCII field into a trimmed
String. - find
- Find the first occurrence of
needleinhay(simple, used for marker scans in headers only). - slice_
at - Return
data[offset..offset+len]or a corruption error. - slice_
at_ lenient - Return
data[offset..]clamped to at mostlenbytes. Used for payloads where vendors routinely declare slightly more bytes than the file contains (truncated final strips are a common real-world quirk).