func hashKernel(data []byte, hash hash.Hash64) (uint32, uint32) {
	hash.Write(data)
	sum := hash.Sum(nil)
	hash.Reset()
	return binary.BigEndian.Uint32(sum[4:8]), binary.BigEndian.Uint32(sum[0:4])
}
hashKernel returns the upper and lower base hash values from which the k
hashes are derived.
package boom
import (
	"encoding/binary"
	"hash"
	"math"
)
const fillRatio = 0.5
type Filter interface {
	Test([]byte) bool
	Add([]byte) Filter
	TestAndAdd([]byte) bool
}
func OptimalM(n uint, fpRate float64) uint {
	return uint(math.Ceil(float64(n) / ((math.Log(fillRatio) *
		math.Log(1-fillRatio)) / math.Abs(math.Log(fpRate)))))
}
func OptimalK(fpRate float64) uint {
	return uint(math.Ceil(math.Log2(1 / fpRate)))
}