Documentation ¶
Overview ¶
Package murmur3 implements Austin Appleby's non-cryptographic MurmurHash3.
Reference implementation: http://code.google.com/p/smhasher/wiki/MurmurHash3 History, characteristics and (legacy) perfs: https://sites.google.com/site/murmurhash/ https://sites.google.com/site/murmurhash/statistics
Index ¶
- func Sum128(data []byte) (h1 uint64, h2 uint64)
- func Sum128WithSeed(data []byte, seed uint32) (h1 uint64, h2 uint64)
- func Sum32(data []byte) uint32
- func Sum32WithSeed(data []byte, seed uint32) uint32
- func Sum64(data []byte) uint64
- func Sum64WithSeed(data []byte, seed uint32) uint64
- type Digest128
- type Digest32
- type Digest64
- type Hash128
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Sum128 ¶
Sum128 returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):
hasher := New128() hasher.Write(data) return hasher.Sum128()
func Sum128WithSeed ¶
Sum128WithSeed returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):
hasher := New128WithSeed(seed) hasher.Write(data) return hasher.Sum128()
func Sum32 ¶
Sum32 returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):
hasher := New32() hasher.Write(data) return hasher.Sum32()
func Sum32WithSeed ¶
Sum32WithSeed returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):
hasher := New32WithSeed(seed) hasher.Write(data) return hasher.Sum32()
func Sum64 ¶
Sum64 returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):
hasher := New64() hasher.Write(data) return hasher.Sum64()
func Sum64WithSeed ¶
Sum64WithSeed returns the MurmurHash3 sum of data. It is equivalent to the following sequence (without the extra burden and the extra allocation):
hasher := New64WithSeed(seed) hasher.Write(data) return hasher.Sum64()
Types ¶
type Digest128 ¶ added in v1.3.0
type Digest128 struct {
// contains filtered or unexported fields
}
Digest128 represents a partial evaluation of a 128 bites hash.
func New128WithSeed ¶
New128WithSeed returns a 128-bit hasher set with explicit seed value
type Digest32 ¶ added in v1.3.0
type Digest32 struct {
// contains filtered or unexported fields
}
Digest32 represents a partial evaluation of a 32 bites hash.
func New32WithSeed ¶
New32WithSeed returns new 32-bit hasher set with explicit seed value
type Digest64 ¶ added in v1.3.0
type Digest64 Digest128
Digest64 is half a Digest128.
func New64WithSeed ¶
New64WithSeed returns a 64-bit hasher set with explicit seed value