Documentation ¶
Index ¶
- Constants
- func Checksum32(in []byte) uint32
- func Checksum32S(in []byte, seed uint32) (h uint32)
- func Checksum64(in []byte) uint64
- func Checksum64S(in []byte, seed uint64) uint64
- func ChecksumString32(s string) uint32
- func ChecksumString32S(s string, seed uint32) uint32
- func ChecksumString64(s string) uint64
- func ChecksumString64S(s string, seed uint64) uint64
- type XXHash32
- type XXHash64
Constants ¶
const Backend = "GoUnsafe"
Backend returns the current version of xxhash being used.
Variables ¶
This section is empty.
Functions ¶
func Checksum32 ¶
Checksum32 returns the checksum of the input data with the seed set to 0.
func Checksum32S ¶
Checksum32S returns the checksum of the input bytes with the specific seed.
func Checksum64S ¶
Checksum64S returns the 64bit xxhash checksum for a single input
func ChecksumString32 ¶
ChecksumString32 returns the checksum of the input data, without creating a copy, with the seed set to 0.
func ChecksumString32S ¶
ChecksumString32S returns the checksum of the input data, without creating a copy, with the specific seed.
func ChecksumString64 ¶
ChecksumString64 returns the checksum of the input data, without creating a copy, with the seed set to 0.
func ChecksumString64S ¶
ChecksumString64S returns the checksum of the input data, without creating a copy, with the specific seed.
Types ¶
type XXHash32 ¶
type XXHash32 struct {
// contains filtered or unexported fields
}
func New32 ¶
func New32() *XXHash32
New32 creates a new hash.Hash32 computing the 32bit xxHash checksum starting with the seed set to 0.
func NewS32 ¶
NewS32 creates a new hash.Hash32 computing the 32bit xxHash checksum starting with the specific seed.
func (*XXHash32) BlockSize ¶
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.
type XXHash64 ¶
type XXHash64 struct {
// contains filtered or unexported fields
}
func New64 ¶
func New64() *XXHash64
New64 creates a new hash.Hash64 computing the 64bit xxHash checksum starting with the seed set to 0x0.
func NewS64 ¶
NewS64 creates a new hash.Hash64 computing the 64bit xxHash checksum starting with the specific seed.
func (*XXHash64) BlockSize ¶
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.