silk/support/zstd_checksum
Profiles: aarch64-apple-darwin, aarch64-unknown-linux-gnu, aarch64-unknown-linux-gnu-no-libc, wasm32-unknown-unknown, x86_64-unknown-linux-gnu, x86_64-unknown-linux-gnu-no-libc.
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.support.zstd_checksum { Xxh64 }.
Public declarations: 1.
Xxh64
pub struct Xxh64An allocation-free seed-zero checksum state with a 32-byte partial stripe.
Associated function Xxh64.make
pub fn make() -> Xxh64Creates an empty seed-zero checksum state without allocating storage.
Method Xxh64.updateByte
pub fn updateByte<'life0>(self: &'life0 mut Xxh64, 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 Xxh64.finish
pub fn finish<'life0>(self: &'life0 Xxh64) -> u64Returns the seed-zero XXH64 digest without changing or consuming the state.