File: murmurhash.3

package info (click to toggle)
libmurmurhash 1.3-2
  • links: PTS, VCS
  • area: main
  • in suites: buster, sid
  • size: 204 kB
  • sloc: ansic: 935; makefile: 46; sh: 9
file content (44 lines) | stat: -rw-r--r-- 2,166 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
.TH LIBMURMURHASH "3" "2019-02-04" "1" "libmurmurhash manual"
.SH NAME
libmurmurhash \- non-cryptographic hash functions
.SH SYNOPSIS
.nf
.B #include <murmurhash.h>
.PP
.BI "void lmmh_x86_32(const void *" addr ", unsigned int " len ", uint32_t " seed ", uint32_t " out "[1]);
.BI "void lmmh_x86_128(const void *" addr ", unsigned int " len ", uint32_t " seed ", uint32_t " out "[4]);
.BI "void lmmh_x64_128(const void *" addr ", unsigned int " len ", uint32_t " seed ", uint64_t " out "[2]);

.SS Deprecated API
.nf
.BI "void MurmurHash3_x86_32(const void *" data ", int " len ", uint32_t " seed ", void *" out ");
.BI "void MurmurHash3_x86_128(const void *" data ", int " len ", uint32_t " seed ", void *" out ");
.BI "void MurmurHash3_x64_128(const void *" data ", int " len ", uint32_t " seed ", void *" out ");
.fi
.SH DESCRIPTION
.TP
LibMurmurHash provides the three variants of MurmurHash3 from the original source. The first parameter \fIaddr\fR specifies the beginning of the data to be hashed in memory. The second parameter \fIlen\fR gives the number of bytes to be hashed. The third parameter \fIseed\fR can be used to compute an alternative hash on the same data. Pass the location of the hash via the \fIout\fR parameter.
.SH EXAMPLE
.TP
Compute the hash of \fIlength\fR bytes starting from \fIdata\fR and print the 32-bit sized hash value.
.PP
.in +4n
.EX
uint32_t hash;
lmmh_x86_32(data, length, 0, &hash);
printf("%" PRIx32 "", hash);
.PP
Do the same, but with a wider hash.
.PP
.in +4n
.EX
uint64_t widehash[2];
lmmh_x64_128(data, length, 0, widehash);
printf("%" PRIx64 "%" PRIx64 "", widehash[0], widehash[1]);
.SH AUTHORS
MurmurHash was created by Austin Appleby. PMurHash was written by Shane Day. Fabian Klötzl created libmurmurhash. All code is dedicated to the public domain.
.SH BUGS
The old API is problematic in that a negative length remains unchecked and the output parameter has very specific alignment requirements. Furthermore, the order of bytes in the hash may differ across architectures.
.SS Reporting Bugs
Please file a bug on GitHub <github.com/kloetzl/libmurmurhash> or send me a mail <fabian-libmurmurhash@kloetzl.info>.
.SS