Handbook
Glossary
farm32-long ( bytes -- hash )
Vocabulary
checksums
.
farmhash
.
private
Inputs
bytes
an
object
Outputs
hash
an
object
Definition
USING:
checksums.cityhash.private
math
math.bitwise
sequences
;
IN:
checksums.farmhash.private
::
farm32-long
( bytes -- hash )
bytes
length
:>
len len bytes len 4
-
fetch32
mur
bytes len 16
-
fetch32
mur
:>
h! len
c1
w*
bytes len 8
-
fetch32
mur
bytes len 12
-
fetch32
mur
:>
g! len
c1
w*
bytes len 20
-
fetch32
mix32
w+
-19
bitroll-32
113
w+
:>
f! len 1
-
20
/i
<iota>
[|
i |
i 20
*
:>
offset bytes offset
fetch32
:>
a bytes offset 4
+
fetch32
:>
b bytes offset 8
+
fetch32
:>
c bytes offset 12
+
fetch32
:>
d bytes offset 16
+
fetch32
:>
e h a
w+
d
mur
e
w+
h! g b
w+
c
mur
a
w+
g! f c
w+
b e
c1
w*
w+
mur
d
w+
g
w+
f! g f
w+
g!
]
each
h g f
finish32
;