Expand description
A binary encoding of sequences of byte slices.
The encoding starts with a sequence of n+1 offsets describing where to find the n slices in the bytes that follow. Treating the offsets as a byte slice too, each offset indicates the location (in bytes) of the end of its slice. Each byte slice can be found from a pair of adjacent offsets, where the first is rounded up to a multiple of eight. This means that slices that are not multiples of eight bytes may leave unread bytes at their end, which is fine.
Structs§
- Decoded
Store - A zero-allocation view into indexed-encoded data, providing random access to individual slices.
Functions§
- decode
- Decodes an encoded sequence of byte slices. Each result will be
u64aligned. - decode_
index - Decodes a specific byte slice by index. It will be
u64aligned. - encode
- Encodes
itemintou64aligned words. - length_
in_ bytes - Encoded length in number of
u8bytes required. - length_
in_ words - Encoded length in number of
u64words required. - validate
- Validates that
storecontains well-formed data compatible with typeT. - validate_
structure - Validates the internal structure of indexed-encoded data.
- write