package xxhash
Import Path
github.com/cespare/xxhash/v2 (on go.dev)
Dependency Relation
imports 5 packages, and imported by 2 packages
Involved Source Files
Package xxhash implements the 64-bit variant of xxHash (XXH64) as described
at http://cyan4973.github.io/xxHash/.
xxhash_amd64.go
xxhash_unsafe.go
xxhash_amd64.s
Package-Level Type Names (only one, which is exported)
Digest implements hash.Hash64.
mem [32]byte
// how much of mem is used
total uint64
v1 uint64
v2 uint64
v3 uint64
v4 uint64
BlockSize always returns 32 bytes.
MarshalBinary implements the encoding.BinaryMarshaler interface.
Reset clears the Digest's state so that it can be reused.
Size always returns 8 bytes.
Sum appends the current hash to b and returns the resulting slice.
Sum64 returns the current hash.
UnmarshalBinary implements the encoding.BinaryUnmarshaler interface.
Write adds more data to d. It always returns len(b), nil.
WriteString adds more data to d. It always returns len(s), nil.
It may be faster than Write([]byte(s)) by avoiding a copy.
*T : github.com/go-git/go-git/v5/plumbing/protocol/packp/sideband.Progress
*T : github.com/jbenet/go-context/io.Writer
*T : encoding.BinaryMarshaler
*T : encoding.BinaryUnmarshaler
*T : hash.Hash
*T : hash.Hash64
*T : io.StringWriter
*T : io.Writer
*T : crypto/hmac.marshalable
*T : golang.org/x/net/http2.stringWriter
*T : net/http.http2stringWriter
func New() *Digest
func writeBlocks(d *Digest, b []byte) int
Package-Level Functions (total 18, in which 3 are exported)
New creates a new Digest that computes the 64-bit xxHash algorithm.
Sum64 computes the 64-bit xxHash digest of b.
Sum64String computes the 64-bit xxHash digest of s.
It may be faster than Sum64([]byte(s)) by avoiding a copy.
Package-Level Variables (total 5, none are exported)
Package-Level Constants (total 7, none are exported)
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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 @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |