xxhash: github.com/OneOfOne/xxhash Index | Files

package xxhash

import "github.com/OneOfOne/xxhash"

Index

Package Files

xxhash.go xxhash_go17.go xxhash_unsafe.go

Constants

const Backend = "GoUnsafe"

Backend returns the current version of xxhash being used.

func Checksum32 Uses

func Checksum32(in []byte) uint32

Checksum32 returns the checksum of the input data with the seed set to 0.

func Checksum32S Uses

func Checksum32S(in []byte, seed uint32) (h uint32)

Checksum32S returns the checksum of the input bytes with the specific seed.

func Checksum64 Uses

func Checksum64(in []byte) uint64

Checksum64 an alias for Checksum64S(in, 0)

func Checksum64S Uses

func Checksum64S(in []byte, seed uint64) uint64

Checksum64S returns the 64bit xxhash checksum for a single input

func ChecksumString32 Uses

func ChecksumString32(s string) uint32

ChecksumString32 returns the checksum of the input data, without creating a copy, with the seed set to 0.

func ChecksumString32S Uses

func ChecksumString32S(s string, seed uint32) uint32

ChecksumString32S returns the checksum of the input data, without creating a copy, with the specific seed.

func ChecksumString64 Uses

func ChecksumString64(s string) uint64

ChecksumString64 returns the checksum of the input data, without creating a copy, with the seed set to 0.

func ChecksumString64S Uses

func ChecksumString64S(s string, seed uint64) uint64

ChecksumString64S returns the checksum of the input data, without creating a copy, with the specific seed.

type XXHash32 Uses

type XXHash32 struct {
    // contains filtered or unexported fields
}

func New32 Uses

func New32() *XXHash32

New32 creates a new hash.Hash32 computing the 32bit xxHash checksum starting with the seed set to 0.

func NewS32 Uses

func NewS32(seed uint32) (xx *XXHash32)

NewS32 creates a new hash.Hash32 computing the 32bit xxHash checksum starting with the specific seed.

func (*XXHash32) BlockSize Uses

func (xx *XXHash32) BlockSize() int

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.

func (*XXHash32) Reset Uses

func (xx *XXHash32) Reset()

func (*XXHash32) Size Uses

func (xx *XXHash32) Size() int

Size returns the number of bytes Sum will return.

func (*XXHash32) Sum Uses

func (xx *XXHash32) Sum(in []byte) []byte

Sum appends the current hash to b and returns the resulting slice. It does not change the underlying hash state.

func (*XXHash32) Sum32 Uses

func (xx *XXHash32) Sum32() (h uint32)

func (*XXHash32) Write Uses

func (xx *XXHash32) Write(in []byte) (n int, err error)

func (*XXHash32) WriteString Uses

func (xx *XXHash32) WriteString(s string) (int, error)

type XXHash64 Uses

type XXHash64 struct {
    // contains filtered or unexported fields
}

func New64 Uses

func New64() *XXHash64

New64 creates a new hash.Hash64 computing the 64bit xxHash checksum starting with the seed set to 0x0.

func NewS64 Uses

func NewS64(seed uint64) (xx *XXHash64)

NewS64 creates a new hash.Hash64 computing the 64bit xxHash checksum starting with the specific seed.

func (*XXHash64) BlockSize Uses

func (xx *XXHash64) BlockSize() int

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.

func (*XXHash64) Reset Uses

func (xx *XXHash64) Reset()

func (*XXHash64) Size Uses

func (xx *XXHash64) Size() int

Size returns the number of bytes Sum will return.

func (*XXHash64) Sum Uses

func (xx *XXHash64) Sum(in []byte) []byte

Sum appends the current hash to b and returns the resulting slice. It does not change the underlying hash state.

func (*XXHash64) Sum64 Uses

func (xx *XXHash64) Sum64() (h uint64)

func (*XXHash64) Write Uses

func (xx *XXHash64) Write(in []byte) (n int, err error)

func (*XXHash64) WriteString Uses

func (xx *XXHash64) WriteString(s string) (int, error)

Package xxhash imports 2 packages (graph) and is imported by 62 packages. Updated 2019-04-25. Refresh now. Tools for package owners.