xxhash

package
v0.0.0-...-e60ae61 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Overview

Package xxhash implements the 64-bit xxHash algorithm (XXH64).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Digest

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

Digest implements hash.Hash64.

func New

func New() *Digest

New returns a new Digest computing the xxHash-64 checksum.

func (*Digest) BlockSize

func (d *Digest) BlockSize() int

BlockSize returns the hash's underlying block size.

func (*Digest) Reset

func (xh *Digest) Reset()

Reset discards the current state and prepares to compute a new hash. We assume a seed of 0 since that is what zstd uses.

func (*Digest) Size

func (d *Digest) Size() int

Size returns the number of bytes Sum will append.

func (*Digest) Sum

func (d *Digest) Sum(b []byte) []byte

Sum appends the current hash to b and returns the resulting slice.

func (*Digest) Sum64

func (xh *Digest) Sum64() uint64

Sum64 returns the current 64-bit hash value.

func (*Digest) Write

func (d *Digest) Write(b []byte) (n int, err error)

Write adds b to the running hash.

Jump to

Keyboard shortcuts

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