silk.compress.zstd_checksum.
Incremental seed-zero XXH64 state for zstd frame checksum validation.
Details#
Xxh64.make creates fixed storage. Xxh64.updateByte accepts decoded bytes, and Xxh64.finish
returns the complete hash without changing the state. The decoder compares 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 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.