CRC32 API Reference

CRC32 checksum computation (IEEE 802.3 polynomial)

Import

U std/crc32

Functions

FunctionSignatureDescription
crc32F crc32(data: i64, len: i64) -> i64Compute CRC32 of buffer
crc32_strF crc32_str(s: str) -> i64Compute CRC32 of string
crc32_update_byteF crc32_update_byte(crc: i64, byte_val: i64) -> i64Update CRC with one byte
crc32_loopF crc32_loop(data: i64, crc: i64, idx: i64, len: i64) -> i64Process byte range

Overview

Uses the standard IEEE 802.3 polynomial (0xEDB88320 in reflected form). Implemented with a bitwise algorithm (no lookup table) using recursive processing.

Usage

U std/crc32

F main() -> i64 {
    data := "Hello, World!"
    checksum := crc32(data, 13)
    0
}