bloom

package
v0.5.6 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Hash

func Hash(b []byte) int32

Hash finds the bucket of a given byte slice between scaleMin and scaleMax TODO(geoah) Rewrite, most likely wrong

func HashChunked

func HashChunked(prefix string, o []byte) []int

HashChunked spilts input in chunks and hashes them individually TODO(geoah) Rewrite, most likely wrong as well

Types

type Bloom

type Bloom []int64

Bloom -

func New

func New(contentHashes ...string) Bloom

func (Bloom) Bloom

func (b Bloom) Bloom() []int64

func (Bloom) Contains

func (b Bloom) Contains(needle []int64) bool

type Bloomer

type Bloomer interface {
	Bloom() []int64
}

Bloomer -

Jump to

Keyboard shortcuts

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