Adler32

Adler32 checksum algorithm.

Properties

Link copied to clipboard
open override val initialValue: Int = 1

Initial value for the checksum.

Functions

Link copied to clipboard
fun SimpleChecksum.compute(data: ByteArray, offset: Int = 0, len: Int = data.size - offset): Int

Computes the checksum of the data determined in the range offset and len.

Link copied to clipboard
inline fun SimpleChecksum.computeWithRead(initial: Int = this.initialValue, read: (buffer: ByteArray) -> Int): Int

Utility to perform a checksum by small chunks of data provided by the read function.

Link copied to clipboard
open override fun update(old: Int, data: ByteArray, offset: Int = 0, len: Int = data.size - offset): Int

Returns an updated checksum starting with an old checksum, and then updating with a data ByteArray in the range offset and len

Link copied to clipboard