This library provides 64-bit and 128-bit MetroHash hashing functions.
var data = [_]u8{
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57,
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 48, 49, 50,
};
const seed: u64 = 1;
const hash: u64 = hash64(data[0..], seed);
var data = [_]u8{
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 48, 49, 50, 51,
52, 53, 54, 55, 56, 57, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57,
48, 49, 50, 51, 52, 53, 54, 55,
56, 57, 48, 49, 50, 51, 52, 53,
54, 55, 56, 57, 48, 49, 50,
};
const seed: u64 = 1;
const hash: u128 = hash128(data[0..], seed);
$ git submodule init && git submodule update
$ zig build test
This implementation is based on jandrewrogers/MetroHash and dgryski/go-metro.
MIT
moznion (moznion@mail.moznion.net)