murmur3

package
v1.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 11, 2017 License: Apache-2.0, BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Native (and fast) implementation of Austin Appleby's MurmurHash3.

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func New32

func New32() hash.Hash32

func New64

func New64() hash.Hash64

func Sum128

func Sum128(data []byte) (h1 uint64, h2 uint64)

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 Sum32

func Sum32(data []byte) uint32

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 Sum64

func Sum64(data []byte) uint64

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()

Types

type Hash128

type Hash128 interface {
	hash.Hash
	Sum128() (uint64, uint64)
}

Hack: the standard api doesn't define any Hash128 interface.

func New128

func New128() Hash128

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL