func UniqueKeys(keys []uint64) bool {
	for j := 0; j < len(keys)-1; j++ {
		elem := keys[j]
		for i := 1; i < j; i++ {
			if keys[i] == elem {
				return false
			}
		}
	}
	return true
}
UniqueKeys is true if all keys are unique
package bloomfilter
import (
	"crypto/rand"
	"encoding/binary"
	"log"
)
const (
	MMin = 2
	KMin = 1
	Uint64Bytes = 8
)
func New(m, k uint64) (*Filter, error) {
	return NewWithKeys(m, newRandKeys(k))
}
func newRandKeys(k uint64) []uint64 {
	keys := make([]uint64, k)
	err := binary.Read(rand.Reader, binary.LittleEndian, keys)
	if err != nil {
		log.Panicf(
			"Cannot read %d bytes from CSRPNG crypto/rand.Read (err=%v)",
			Uint64Bytes, err,
		)
	}
	return keys
}
func (f *Filter) NewCompatible() (*Filter, error) {
	return NewWithKeys(f.m, f.keys)
}
func NewOptimal(maxN uint64, p float64) (*Filter, error) {
	m := OptimalM(maxN, p)
	k := OptimalK(m, maxN)
	debug("New optimal bloom filter ::"+
		" requested max elements (n):%d,"+
		" probability of collision (p):%1.10f "+
		"-> recommends -> bits (m): %d (%f GiB), "+
		"number of keys (k): %d",
		maxN, p, m, float64(m)/(gigabitsPerGiB), k)
	return New(m, k)
}