bloom

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2019 License: Apache-2.0 Imports: 2 Imported by: 5

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