bloom

package module
v0.0.0-...-3e779d4 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2019 License: BSD-3-Clause Imports: 0 Imported by: 0

README

bloom

Golang Bloom filter package

simple

A simple Bloom filter that uses the FNV-1a hash and the (a + ib) % m trick to generate i hashes from a single FNV-1a computation.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitArray

type BitArray []byte

BitArray is an array of bits represented by a slice of bytes.

func NewBitArray

func NewBitArray(n uint64) BitArray

NewBitArray creates a new array of bits of size n bits.

func (BitArray) Get

func (a BitArray) Get(i uint64) uint

Get returns the value of bit i, where i is from 0 to the size of the BitArray minus 1.

func (BitArray) Set

func (a BitArray) Set(i uint64)

Set sets bit i to 1, where i is from 0 to the size of the BitArray minus 1.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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