Function cgl_rs::utils::super_fast_hash
source · pub fn super_fast_hash(data: &[u8]) -> u32
Expand description
Calculates the SuperFastHash of the given data.
This algorithm is from http://www.azillionmonkeys.com/qed/hash.html
Arguments
data
- A slice of bytes representing the data to calculate the SuperFastHash for.
Returns
A u32
representing the calculated SuperFastHash.
Example
let data = b"hello world";
let super_fast_hash = cgl_rs::utils::super_fast_hash(data);
assert_eq!(super_fast_hash, 2794219650);