Browse the docs

silk.compress.checksum.

CRC checksums used by gzip and XZ containers.

Import as CompressionChecksum with import silk.compress.checksum { CompressionChecksum }.

Public declarations: 1.

CompressionChecksum#

silk
pub struct CompressionChecksum

Allocation-free container checksums.

Implementation CompressionChecksum#

silk
impl CompressionChecksum

Associated function crc32#

silk
pub fn crc32(bytes: &[u8]) -> u32

Returns the reflected IEEE CRC-32 of the supplied bytes.

Associated function crc32Byte#

silk
pub fn crc32Byte(state: u32, byte: u8) -> u32

Updates a running reflected CRC-32; initialize and finalize by XOR with 4294967295.

Associated function crc64#

silk
pub fn crc64(bytes: &[u8]) -> u64

Returns the CRC-64/XZ checksum of the supplied bytes.

Category: Data formats.

Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, wasm32-wasip1, wasm32-wasip2.

View the source of this page