Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cwpearson/nim-murmurhash
Pure-nim MurmurHash implementation
https://github.com/cwpearson/nim-murmurhash
Last synced: 2 months ago
JSON representation
Pure-nim MurmurHash implementation
- Host: GitHub
- URL: https://github.com/cwpearson/nim-murmurhash
- Owner: cwpearson
- Created: 2019-08-16T19:04:31.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-08-22T14:03:57.000Z (over 5 years ago)
- Last Synced: 2024-08-04T03:07:05.031Z (6 months ago)
- Language: Nim
- Homepage:
- Size: 17.6 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-nim - murmurhash - Pure Nim implementation of MurmerHash (Algorithms / Cryptography)
README
# nim-murmur
[![Build Status](https://travis-ci.org/cwpearson/nim-murmurhash.svg?branch=master)](https://travis-ci.org/cwpearson/nim-murmurhash)
A pure-nim implementation of MurmurHash. Has MurmurHash3 and MurmurHash2, and does not wrap a C implementation.
Adapted from https://github.com/aappleby/smhasher
## Using
This is in the nimble package manager as `murmurhash`, so you can put
```
requires murmurhash>=0.4.0
```in your nimble file. Or, to pin to a particuar commit, do
```
requires "https://github.com/cwpearson/nim-murmurhash#b44ed52"
```then,
```nim
import murmurhash
```## About
Only two functions implemented currently.
- Murmur3
- [x] MurmurHash3_x64_128
- [ ] MurmurHash3_x86_32
- [ ] MurmurHash3_x86_128
- Murmur2
- [x] MurmurHash64A - The original 64-bit version. Optimized for 64-bit arithmetic.
- [ ] MurmurHash2 - The original version; contains a flaw that weakens collision in some cases.
- [ ] MurmurHash2A - A fixed variant using Merkle–Damgård construction construction. Slightly slower.
- [ ] CMurmurHash2A - MurmurHash2A but works incrementally.
- [ ] MurmurHashNeutral2 - Slower, but endian and alignment neutral.
- [ ] MurmurHashAligned2 - Slower, but does aligned reads (safer on some platforms).
- [ ] MurmurHash64B (64-bit, x86) - A 64-bit version optimized for 32-bit platforms. Unfortunately it is not a true 64-bit hash due to insufficient mixing of the stripes.
- Murmur
- [ ] MurmurHash1## Related:
* nimble `murmur` package https://github.com/olahol/nimrod-murmur/. Doesn't have Murmur3 or Murmur2.
* [vitanim](https://github.com/timotheecour/vitanim/blob/master/murmur/murmur.nim) by timotheecour. Pure nim murmur3 only. Not set up as a package.
* nimble `murmur3` package https://github.com/boydgreenfield/nimrod-murmur. Wraps a c implementation.