func (f *CountingFilter64) Test(data []byte) bool {
	b := f.b[0]
	for _, v := range f.bits(data) {
		if !b.Test(v) {
			return false
		}
	}
	return true
}
Checks whether data was previously added to the filter. Returns true if
yes, with a false positive chance near the ratio specified upon creation
of the filter. The result cannot cannot be falsely negative (unless one
has removed an item that wasn't actually added to the filter previously.)
package bloom
import (
	"github.com/pmylund/go-bitset"
	"hash"
	"hash/crc64"
	"hash/fnv"
	"math"
)
type filter64 struct {
	m  uint64
	k  uint64
	h  hash.Hash64
	oh hash.Hash64
}
func (f *filter64) bits(data []byte) []uint64 {
	f.h.Reset()
	f.h.Write(data)
	a := f.h.Sum64()
	f.oh.Reset()
	f.oh.Write(data)
	b := f.oh.Sum64()
	is := make([]uint64, f.k)
	for i := uint64(0); i < f.k; i++ {
		is[i] = (a + b*i) % f.m
	}
	return is
}
func newFilter64(m, k uint64) *filter64 {
	return &filter64{
		m:  m,
		k:  k,
		h:  fnv.New64(),
		oh: crc64.New(crc64.MakeTable(crc64.ECMA)),
	}
}
func estimates64(n uint64, p float64) (uint64, uint64) {
	nf := float64(n)
	log2 := math.Log(2)
	m := -1 * nf * math.Log(p) / math.Pow(log2, 2)
	k := math.Ceil(log2 * m / nf)
	return uint64(m), uint64(k)
}
type Filter64 struct {
	*filter64
	b *bitset.Bitset64
}
func (f *Filter64) Test(data []byte) bool {
	for _, i := range f.bits(data) {
		if !f.b.Test(i) {
			return false
		}
	}
	return true
}
func (f *Filter64) Add(data []byte) {
	for _, i := range f.bits(data) {
		f.b.Set(i)
	}
}
func (f *Filter64) Reset() {
	f.b.Reset()
}
func New64(n int64, p float64) *Filter64 {
	m, k := estimates64(uint64(n), p)
	f := &Filter64{
		newFilter64(m, k),
		bitset.New64(m),
	}
	return f
}
type CountingFilter64 struct {
	*filter64
	b []*bitset.Bitset64
}