package murmur3
Import Path
github.com/spaolacci/murmur3 (on go.dev)
Dependency Relation
imports 2 packages, and imported by one package
Involved Source Files
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
murmur128.go
murmur32.go
murmur64.go
Package-Level Type Names (only one)
Hash128 represents a 128-bit hasher
Hack: the standard api doesn't define any Hash128 interface.
BlockSize returns the hash's underlying block size.
The Write method must be able to accept any amount
of data, but it may operate more efficiently if all writes
are a multiple of the block size.
Reset resets the Hash to its initial state.
Size returns the number of bytes Sum will return.
Sum appends the current hash to b and returns the resulting slice.
It does not change the underlying hash state.
( Hash128) Sum128() (uint64, uint64)
( Hash128) Write([]byte) (int, error)
Hash128 : github.com/gogo/protobuf/proto.Sizer
Hash128 : github.com/miekg/dns.Writer
Hash128 : hash.Hash
Hash128 : internal/bisect.Writer
Hash128 : io.Writer
func New128() Hash128
func New128WithSeed(seed uint32) Hash128
Package-Level Functions (total 12)
New128 returns a 128-bit hasher
New128WithSeed returns a 128-bit hasher set with explicit seed value
New32 returns new 32-bit hasher
New32WithSeed returns new 32-bit hasher set with explicit seed value
New64 returns a 64-bit hasher
New64WithSeed returns a 64-bit hasher set with explicit seed value
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()
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()
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()
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()
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()
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()
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |