README.md

# murmur3a

[![Package Version](https://img.shields.io/hexpm/v/murmur3a)](https://hex.pm/packages/murmur3a)
[![Hex Docs](https://img.shields.io/badge/hex-docs-ffaff3)](https://hexdocs.pm/murmur3a/)

A _nearly_ pure Gleam implementation of the 32bit Murmur3 hash function[^1].

```sh
gleam add murmur3a
```
```gleam
import gleam/io
import murmur3a

pub fn main() {
  murmur3a.hash_string("Hello!", 1)
  |> murmur3a.hex_digest
  |> io.debug
  // "DC75D641"
}
```

API documentation can be found at <https://hexdocs.pm/murmur3a>.

## Development

```sh
gleam test  # Run the tests
```

## Credits

murmur3a leans heavily on Robin Heggelund Hansen's [Elm implementation](https://github.com/robinheghan/murmur3/).

  [^1]: Only [two functions](src/murmur3a_ffi.mjs) rely on JavaScript.