Skip to main content

Module codec

Module codec 

Source
Expand description

Little-endian field helpers and CRC-32 used by every on-disk structure.

All multi-byte integers are stored little-endian, so images are portable between machines (the doublets store uses native endianness, which is little-endian on every platform LFS targets).

Functionsยง

crc32
CRC-32 (IEEE 802.3, the zlib/PNG polynomial).
crc32_update
Continues a CRC-32 computation over another slice.
get_i64
Reads a little-endian i64 at offset.
get_u32
Reads a little-endian u32 at offset.
get_u64
Reads a little-endian u64 at offset.
put_i64
Writes a little-endian i64 at offset.
put_u32
Writes a little-endian u32 at offset.
put_u64
Writes a little-endian u64 at offset.