Versions in this module Expand all Collapse all v0 v0.3.1 Jan 28, 2022 Changes in this version + var ErrExists = errors.New("key exists in DB") + var ErrFrozen = errors.New("DB already frozen") + var ErrMPHFail = errors.New("failed to build MPH") + var ErrNoKey = errors.New("No such key") + var ErrValueTooLarge = errors.New("value is larger than 2^32-1 bytes") + type Chd struct + func (c *Chd) DumpMeta(w io.Writer) + func (c *Chd) Find(k uint64) uint64 + func (c *Chd) Len() int + func (c *Chd) MarshalBinary(w io.Writer) (int, error) + func (c *Chd) SeedSize() byte + func (c *Chd) UnmarshalBinaryMmap(buf []byte) error + type ChdBuilder struct + func New() (*ChdBuilder, error) + func (c *ChdBuilder) Add(key uint64) error + func (c *ChdBuilder) Freeze(load float64) (*Chd, error) + type DBReader struct + func NewDBReader(fn string, cache int) (rd *DBReader, err error) + func (rd *DBReader) Close() + func (rd *DBReader) DumpMeta(w io.Writer) + func (rd *DBReader) Find(key uint64) ([]byte, error) + func (rd *DBReader) Len() int + func (rd *DBReader) Lookup(key uint64) ([]byte, bool) + type DBWriter struct + func NewDBWriter(fn string) (*DBWriter, error) + func (w *DBWriter) Abort() + func (w *DBWriter) Add(key uint64, val []byte) error + func (w *DBWriter) AddKeyVals(keys []uint64, vals [][]byte) (int, error) + func (w *DBWriter) Freeze(load float64) (err error) + func (w *DBWriter) Len() int