FixIO Documentation

Back to summary

Global functions

Checksum

import "io/checksum";

function crc32(arr: Byte[]): Integer
function crc32(arr: Byte[], off: Integer, len: Integer): Integer
Computes a CRC-32 checksum for given array (or portion of it).
function crc32(prev_crc: Integer, arr: Byte[]): Integer
function crc32(prev_crc: Integer, arr: Byte[], off: Integer, len: Integer): Integer
A variant that can compute CRC-32 checksum incrementally. The initial value must be 0xFFFFFFFF (or just -1). To finalize the checksum the result must be XORed with 0xFFFFFFFF.