avro · API

avro.crc32

CRC-32 (IEEE 802.3, the zlib/gzip polynomial).

Avro's snappy codec appends the big-endian CRC-32 of the uncompressed block to every compressed block. That is the only place avro.mojo needs a checksum, so it is a small table-driven implementation rather than a dependency on hashes.mojo.

Functions

crc32

def crc32(data: Span[UInt8], seed: UInt32 = UInt32(0)) -> UInt32