hash

package
v1.10.41 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2026 License: MIT Imports: 3 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JumpHash added in v1.9.0

func JumpHash(key uint64, numBuckets int) int

JumpHash consistently chooses a bucket in the range [0, numBuckets) for the given key. Zero or negative numBuckets are treated as numBuckets = 1. See: https://arxiv.org/pdf/1406.2294.pdf

Go implementation from https://github.com/go-distsys/jumphash.

func JumpHashStr added in v1.9.0

func JumpHashStr(key string, numBuckets int) int

JumpHashStr is like JumpHash, but takes a string key and xxh3-hashes it.

func XXH3Hex

func XXH3Hex(b []byte) string

XXH3Hex returns 64-bit xxh3 hash in hexadecimal form (16 chars).

Types

This section is empty.

Jump to

Keyboard shortcuts

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