func (p *PackedTable) Init(_, bitsPerTag, num uint, initialBucketsHint []byte) error {
	p.bitsPerTag = bitsPerTag
	p.numBuckets = num
	p.kDirBitsPerTag = p.bitsPerTag - cFpSize
	p.kBitsPerBucket = (p.bitsPerTag - 1) * tagsPerPTable
	p.kBytesPerBucket = (p.kBitsPerBucket + 7) >> 3
	p.kDirBitsMask = ((1 << p.kDirBitsPerTag) - 1) << cFpSize
	p.len = (p.kBitsPerBucket*p.numBuckets+7)>>3 + 7
	buckets, err := getBucketsFromHint(initialBucketsHint, p.len)
	if err != nil {
		return err
	}
	p.buckets = buckets
	p.perm.Init()
	return nil
}
Init init table
package cuckoo
import (
	"bytes"
	"encoding/binary"
	"fmt"
	"io"
	"math/rand"
)
type PackedTable struct {
	kDirBitsPerTag  uint
	kBitsPerBucket  uint
	kBytesPerBucket uint
	kDirBitsMask    uint32
	bitsPerTag      uint
	len        uint
	numBuckets uint
	buckets    []byte
	perm       PermEncoding
}
func NewPackedTable() *PackedTable {
	return &PackedTable{}
}
const (
	cFpSize       = 4
	tagsPerPTable = 4
	codeSize      = 12
)