murmur_nif (murmur_nif v0.1.0)

View Source

Summary

Functions

Cassandra/Scylla-compatible variant of MurmurHash3 x64_128. Identical to murmur3_x64_128/1 except the input bytes are treated as signed (matching Java's signed byte type), which changes the sign-extension of the tail-block accumulator and produces hashes that match the partitioner used by Cassandra and Scylla.

MurmurHash3, 128-bit variant for 64-bit platforms (Austin Appleby's standard implementation). Hashes Bin with seed 0 and returns a 16-byte binary <<H1:64, H2:64>>.

Functions

murmur3_cassandra_x64_128(Bin)

-spec murmur3_cassandra_x64_128(binary()) -> binary().

Cassandra/Scylla-compatible variant of MurmurHash3 x64_128. Identical to murmur3_x64_128/1 except the input bytes are treated as signed (matching Java's signed byte type), which changes the sign-extension of the tail-block accumulator and produces hashes that match the partitioner used by Cassandra and Scylla.

Use this to compute partition tokens for token-aware routing.

murmur3_x64_128(Bin)

-spec murmur3_x64_128(binary()) -> binary().

MurmurHash3, 128-bit variant for 64-bit platforms (Austin Appleby's standard implementation). Hashes Bin with seed 0 and returns a 16-byte binary <<H1:64, H2:64>>.