Module fasthash::xx
[−]
[src]
xxHash
- Extremely fast hash algorithm
by Yann Collet
http://cyan4973.github.io/xxHash/
xxHash is an Extremely fast Hash algorithm, running at RAM speed limits.
It successfully completes the SMHasher
test suite which evaluates collision,
dispersion and randomness qualities of hash functions. Code is highly portable,
and hashes are identical on all platforms (little / big endian).
Example
use std::hash::{Hash, Hasher}; use fasthash::{xx, XXHasher}; fn hash<T: Hash>(t: &T) -> u64 { let mut s: XXHasher = Default::default(); t.hash(&mut s); s.finish() } let h = xx::hash64(b"hello world\xff"); assert_eq!(h, hash(&"hello world"));
Structs
XXHash32 |
xxHash 32-bit hash functions |
XXHash64 |
xxHash 64-bit hash functions |
XXHasher32 |
An implementation of |
XXHasher64 |
An implementation of |
Functions
hash32 |
xxHash 32-bit hash functions for a byte array. |
hash32_with_seed |
xxHash 32-bit hash function for a byte array. For convenience, a 32-bit seed is also hashed into the result. |
hash64 |
xxHash 64-bit hash functions for a byte array. |
hash64_with_seed |
xxHash 64-bit hash function for a byte array. For convenience, a 64-bit seed is also hashed into the result. |