Try Install Learn Blog API Packages GitHub
Pages

Murmur3.Private

Private internals of Murmur3, do not use these.

The public interface is in the Murmur3 module.

Functions

finalize
(
data
:
Murmur3.Private.HashData
)
:
Number
hashFold
(
data
:
Murmur3.Private.HashData
char
:
Number
)
:
Murmur3.Private.HashData

handles each char of the input string

isSurrogatePair
(
c
:
String
)
:
Tuple(Bool, Number)

determines if a character is the start of a 16 bit surrogate pair

joinSurrogatePair
(
l
:
Number
r
:
String
)
:
Number

combines 16 bit surrogate pairs into a 32 bit integer

mix
(
h1
:
Number
k1
:
Number
)
:
Number
multiplyBy
(
b
:
Number
a
:
Number
)
:
Number

32-bit multiplication

rotlBy
(
b
:
Number
a
:
Number
)
:
Number

Given a 32bit int and an int representing a number of bit positions, returns the 32bit int rotated left by that number of positions. rotlBy : Int -> Int -> Int

stringCodepointReduce
(
start
:
a
fn
:
Function(a, Number, a)
str
:
String
)
:
a

reduce over 32 bit codepoints of a string. handles joining surrogate pairs into a single codepoint