Help us shape the future of Go! Take the 2026 Go Developer Survey

bloom

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2020 License: Apache-2.0 Imports: 2 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BloomFilter

type BloomFilter interface {
	// Add key into bloom filter
	Add([]byte)
	// Exist checks if a key is in bloom filter
	Exist([]byte) bool
	// Bytes returns the bytes of bloom filter
	Bytes() []byte
}

BloomFilter interface

func BloomFilterFromBytes

func BloomFilterFromBytes(b []byte, m, h uint) (BloomFilter, error)

BloomFilterFromBytes constructs a bloom filter from bytes

func NewBloomFilter

func NewBloomFilter(m, h uint) (BloomFilter, error)

NewBloomFilter returns a new bloom filter

Jump to

Keyboard shortcuts

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