No description
Find a file
2019-08-19 06:21:10 -05:00
ci add travis 2019-08-16 14:13:36 -05:00
src rename murmur -> murmurhash 2019-08-17 09:11:24 -05:00
tests rename murmur -> murmurhash 2019-08-17 09:11:24 -05:00
.travis.yml add travis 2019-08-16 14:13:36 -05:00
murmurhash.nimble bump version 2019-08-17 09:11:46 -05:00
README.md update readme 2019-08-19 06:21:10 -05:00

nim-murmur

Build Status

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,

import murmurhash

About

Only two functions implemented currently.

  • Murmur3
    • MurmurHash3_x64_128
    • MurmurHash3_x86_32
    • MurmurHash3_x86_128
  • Murmur2
    • 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 MerkleDamgå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