silk.compress.zstd_checksum.
Incremental seed-zero XXH64 state for zstd frame checksums.
Details#
Xxh64.make creates fixed storage. Xxh64.updateByte and Xxh64.update accept bytes, and
Xxh64.finish returns the complete hash without changing the state. Frames store its low 32
bits.
Import as Xxh64 with import silk.compress.zstd_checksum { Xxh64 }.
Public declarations: 1.
Xxh64#
pub struct Xxh64An allocation-free seed-zero checksum state with a 32-byte partial stripe.
Implementation Xxh64#
impl Xxh64Associated function make#
pub fn make() -> Xxh64Creates an empty seed-zero checksum state without allocating storage.
Method updateByte#
pub fn updateByte(self: &mut Self, value: u8) -> ()Adds one decoded byte without allocating storage.
Gotchas#
The caller must reject input that would make the total byte count exceed u64.MAX.
Method update#
pub fn update(self: &mut Self, bytes: &[u8]) -> ()Adds a run of bytes without allocating storage.
Gotchas#
The caller must reject input that would make the total byte count exceed u64.MAX.
Method finish#
pub fn finish(self: &Self) -> u64Returns the seed-zero XXH64 digest without changing or consuming the state.
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, x86_64-pc-windows-msvc, wasm64-unknown-unknown.