XXH64 non-cryptographic hash in pure OCaml
0

Configure Feed

Select the types of activity you want to include in your feed.

OCaml 86.5%
Dune 3.1%
Makefile 0.8%
Other 9.6%
7 1 0

Clone this repository

https://git.vm.fail/gazagnaire.org/ocaml-xxhash https://git.vm.fail/did:plc:z2ipapqqoht3flmn3rgbsywr
ssh://git@git.recoil.org:2222/gazagnaire.org/ocaml-xxhash ssh://git@git.recoil.org:2222/did:plc:z2ipapqqoht3flmn3rgbsywr

For self-hosted knots, clone URLs may differ based on your setup.


README.md

xxhash#

The xxHash non-cryptographic hash in pure OCaml (XXH64).

Overview#

xxHash is a fast non-cryptographic hash. This library implements the 64-bit variant, XXH64. Apache Parquet's split-block bloom filters hash their values with XXH64 (seed 0), so this is the hash that backs Parquet bloom-filter probes.

Installation#

$ opam install xxhash

If opam cannot find the package, it may not yet be released in the public opam-repository. Add the overlay repository, then install it:

$ opam repo add samoht https://tangled.org/gazagnaire.org/opam-overlay.git
$ opam update
$ opam install xxhash

Usage#

The digest matches the reference xxhsum -H64:

# Printf.sprintf "%016Lx" (Xxhash.hash64_string "")
- : string = "ef46db3751d8e999"
# Printf.sprintf "%016Lx" (Xxhash.hash64_string "The quick brown fox jumps over the lazy dog")
- : string = "0b242d361fda71bc"