Implementation of the 32 bit variant of the Murmur3 non-cryptographic hash function.
https://hexdocs.pm/murmur3a/
- Gleam 84.7%
- Nix 13.6%
- JavaScript 1.7%
| LICENSES | feat: Hello World | |
| src | Byte hashing go brrr | |
| test | Add hash_bytes and simplify hashing internals | |
| .gitignore | feat: Hello World | |
| flake.lock | Bump nix flake | |
| flake.nix | Optimise hashing to only traverse lists once | |
| gleam.toml | New release, again | |
| manifest.toml | Bump dependencies | |
| README.md | docs: Add badges to indicate Erlang and JavaScript compatibility | |
| REUSE.toml | feat: Hello World | |
murmur3a
Package Version Hex Docs Erlang-compatible JavaScript-compatible
A pure Gleam implementation of the 32bit Murmur3 non-cryptographic hash function (with a little JavaScript optimisation).
gleam add murmur3a
importgleam/ioimportmurmur3apubfnmain(){murmur3a.hash_string("Hello!",1)|>murmur3a.hex_digest// -> "DC75D641"
}API documentation can be found at https://hexdocs.pm/murmur3a.
Development
gleam test # Run the tests with erlang
gleam test --target javascript # Run the tests with bun
Credits
murmur3a leans heavily on Robin Heggelund Hansen's Elm implementation.