crc32

abstract fun crc32(data: ByteArray, value: ULong): Long

Method: zlib.crc32(data[, value])

Calculates the CRC32 checksum of the given data.

Parameters

data

The data to calculate the checksum for. This can be a string, a buffer, a typed array, or any other array-like raw data.

value

An optional initial value for the checksum. This can be used to calculate the checksum of a stream of data in multiple parts.


open fun crc32(data: Value?, value: Value? = null): Long

Method: zlib.crc32(data[, value])

Calculates the CRC32 checksum of the given data; this method variant operates on foreign Value instances.

Parameters

data

The data to calculate the checksum for. This can be a string, a buffer, a typed array, or any other array-like raw data.

value

An optional initial value for the checksum. This can be used to calculate the checksum of a stream of data in multiple parts.