Documentation ¶
Index ¶
- Constants
- func Bytesmask(fixedbits int) (fixedbytes int, mask byte)
- func CutLeft(bm *roaring.Bitmap, sizeLimit uint64) *roaring.Bitmap
- func CutLeft64(bm *roaring64.Bitmap, sizeLimit uint64) *roaring64.Bitmap
- func Get(db kv.Tx, bucket string, key []byte, from, to uint32) (*roaring.Bitmap, error)
- func Get64(db kv.Tx, bucket string, key []byte, from, to uint64) (*roaring64.Bitmap, error)
- func NewBitmap() *roaring.Bitmap
- func NewBitmap64() *roaring64.Bitmap
- func ReturnToPool(a *roaring.Bitmap)
- func ReturnToPool64(a *roaring64.Bitmap)
- func SeekInBitmap(m *roaring.Bitmap, n uint32) (found uint32, ok bool)
- func SeekInBitmap64(m *roaring64.Bitmap, n uint64) (found uint64, ok bool)
- func TruncateRange(db kv.RwTx, bucket string, key []byte, to uint32) error
- func TruncateRange64(db kv.RwTx, bucket string, key []byte, to uint64) error
- func Walk(c kv.Cursor, startkey []byte, fixedbits int, ...) error
- func WalkChunkWithKeys(k []byte, m *roaring.Bitmap, sizeLimit uint64, ...) error
- func WalkChunkWithKeys64(k []byte, m *roaring64.Bitmap, sizeLimit uint64, ...) error
- func WalkChunks(bm *roaring.Bitmap, sizeLimit uint64, ...) error
- func WalkChunks64(bm *roaring64.Bitmap, sizeLimit uint64, ...) error
- type BitmapStream
- type FixedSizeBitmaps
- func (bm *FixedSizeBitmaps) At(item uint64) (res []uint64, err error)
- func (bm *FixedSizeBitmaps) Close()
- func (bm *FixedSizeBitmaps) FileName() string
- func (bm *FixedSizeBitmaps) FilePath() string
- func (bm *FixedSizeBitmaps) First2At(item, after uint64) (fst uint64, snd uint64, ok, ok2 bool, err error)
- type FixedSizeBitmapsWriter
- type ToBitamp
- type ToBitmap
- type ToIterInterface
Constants ¶
const ChunkLimit = uint64(1950 * datasize.B) // threshold beyond which MDBX overflow pages appear: 4096 / 2 - (keySize + 8)
const MaxUint32 = 1<<32 - 1
const MetaHeaderSize = 64
Variables ¶
This section is empty.
Functions ¶
func CutLeft ¶
CutLeft - cut from bitmap `targetSize` bytes from left removing lft part from `bm` returns nil on zero cardinality
func CutLeft64 ¶
CutLeft - cut from bitmap `targetSize` bytes from left removing lft part from `bm` returns nil on zero cardinality
func Get ¶
Get - reading as much chunks as needed to satisfy [from, to] condition join all chunks to 1 bitmap by Or operator
func Get64 ¶
Get - reading as much chunks as needed to satisfy [from, to] condition join all chunks to 1 bitmap by Or operator
func NewBitmap64 ¶
func ReturnToPool ¶
func ReturnToPool64 ¶
func SeekInBitmap ¶
SeekInBitmap - returns value in bitmap which is >= n
func SeekInBitmap64 ¶
SeekInBitmap - returns value in bitmap which is >= n
func TruncateRange ¶
TruncateRange - gets existing bitmap in db and call RemoveRange operator on it. starts from hot shard, stops when shard not overlap with [from-to) !Important: [from, to)
func TruncateRange64 ¶
TruncateRange - gets existing bitmap in db and call RemoveRange operator on it. starts from hot shard, stops when shard not overlap with [from-to) !Important: [from, to)
func WalkChunkWithKeys ¶
func WalkChunkWithKeys64 ¶
func WalkChunks ¶
Types ¶
type BitmapStream ¶
type BitmapStream struct {
// contains filtered or unexported fields
}
func NewBitmapStream ¶
func NewBitmapStream(bm *roaring64.Bitmap) *BitmapStream
func (*BitmapStream) Close ¶
func (it *BitmapStream) Close()
func (*BitmapStream) HasNext ¶
func (it *BitmapStream) HasNext() bool
func (*BitmapStream) Next ¶
func (it *BitmapStream) Next() (uint64, error)
type FixedSizeBitmaps ¶
type FixedSizeBitmaps struct {
// contains filtered or unexported fields
}
func OpenFixedSizeBitmaps ¶
func OpenFixedSizeBitmaps(filePath string, bitsPerBitmap int) (*FixedSizeBitmaps, error)
func (*FixedSizeBitmaps) Close ¶
func (bm *FixedSizeBitmaps) Close()
func (*FixedSizeBitmaps) FileName ¶
func (bm *FixedSizeBitmaps) FileName() string
func (*FixedSizeBitmaps) FilePath ¶
func (bm *FixedSizeBitmaps) FilePath() string
type FixedSizeBitmapsWriter ¶
type FixedSizeBitmapsWriter struct {
// contains filtered or unexported fields
}
func NewFixedSizeBitmapsWriter ¶
func NewFixedSizeBitmapsWriter(indexFile string, bitsPerBitmap int, amount uint64, logger log.Logger) (*FixedSizeBitmapsWriter, error)
func (*FixedSizeBitmapsWriter) AddArray ¶
func (w *FixedSizeBitmapsWriter) AddArray(item uint64, listOfValues []uint64) error
func (*FixedSizeBitmapsWriter) Build ¶
func (w *FixedSizeBitmapsWriter) Build() error
func (*FixedSizeBitmapsWriter) Close ¶
func (w *FixedSizeBitmapsWriter) Close()
func (*FixedSizeBitmapsWriter) DisableFsync ¶
func (w *FixedSizeBitmapsWriter) DisableFsync()
type ToIterInterface ¶
type ToIterInterface struct {
// contains filtered or unexported fields
}
func ToIter ¶
func ToIter(it roaring64.IntIterable64) *ToIterInterface
func (*ToIterInterface) HasNext ¶
func (i *ToIterInterface) HasNext() bool
func (*ToIterInterface) Next ¶
func (i *ToIterInterface) Next() (uint64, error)