commit | 67d25c13e3d82579180d893b1835d43fc222fa45 | [log] [tgz] |
---|---|---|
author | jwerle <joseph.werle@gmail.com> | Thu Apr 14 14:02:41 2022 -0400 |
committer | jwerle <joseph.werle@gmail.com> | Thu Apr 14 14:02:41 2022 -0400 |
tree | 190a30c71fde90921d7398e3f3239eee6f5a9a09 | |
parent | 0166010d5119ac69a909ce38ec3f4b2d16cf251c [diff] |
doc(README.md): update docs
MurmurHash3 general hash bashed lookup function implementation
MurmurHash is a non-cryptographic hash function suitable for general hash-based lookup. This implementation implements version 3 of MurmurHash.
clib:
$ clib install jwerle/murmurhash.c
source:
$ git clone git@github.com:jwerle/murmurhash.c.git $ cd murmurhash.c $ make $ make install
#include <stdlib.h> #include <string.h> #include <murmurhash.h> int main (void) { uint32_t seed = 0; const char *key = "kinkajou"; uint32_t hash = murmurhash(key, (uint32_t) strlen(key), seed); // 0xb6d99cf8 return 0; }
A command line executable is also available:
$ echo -n kinkajou | murmur 3067714808
$ echo -n panda | murmur --seed=10 1406483717
uint32_t murmurhash (const char *key, uint32_t len, uint32_t seed);
Returns a murmur hash of key
based on seed
using the MurmurHash3 algorithm.
MIT