Versions in this module Expand all Collapse all v0 v0.2.5 Mar 29, 2021 Changes in this version + const Version + var ErrDecode = fmt.Errorf("invalid encoding for RLE+ version %d", Version) + var ErrEndOfIterator = errors.New("end of iterator") + var ErrSameValRuns = errors.New("2 consecutive runs with the same value") + var ErrWrongVersion = errors.New("invalid RLE+ version") + func Count(ri RunIterator) (uint64, error) + func EncodeRuns(rit RunIterator, buf []byte) ([]byte, error) + func IsSet(ri RunIterator, x uint64) (bool, error) + func SliceFromRuns(source RunIterator) ([]uint64, error) + func ValidateRLE(buf []byte) error + type BitIterator interface + HasNext func() bool + Next func() (uint64, error) + Nth func(n uint64) (uint64, error) + func BitsFromRuns(source RunIterator) (BitIterator, error) + func BitsFromSlice(slice []uint64) BitIterator + type RLE struct + func FromBuf(buf []byte) (RLE, error) + func (rle *RLE) Bytes() []byte + func (rle *RLE) Count() (uint64, error) + func (rle *RLE) MarshalJSON() ([]byte, error) + func (rle *RLE) RunIterator() (RunIterator, error) + func (rle *RLE) UnmarshalJSON(b []byte) error + func (rle *RLE) Validate() error + type Run struct + Len uint64 + Val bool + func (r Run) Valid() bool + type RunIterable interface + RunIterator func() (RunIterator, error) + type RunIterator interface + HasNext func() bool + NextRun func() (Run, error) + func And(a, b RunIterator) (RunIterator, error) + func DecodeRLE(buf []byte) (RunIterator, error) + func Fill(iter RunIterator) (RunIterator, error) + func JoinClose(it RunIterator, closeness uint64) (RunIterator, error) + func NewFromZipfDist(seed int64, size int) RunIterator + func Or(a, b RunIterator) (RunIterator, error) + func RunsFromBits(source BitIterator) (RunIterator, error) + func RunsFromSlice(slice []uint64) (RunIterator, error) + func Subtract(a, b RunIterator) (RunIterator, error) + func Union(iters ...RunIterator) (RunIterator, error) + type RunSliceIterator struct + Runs []Run + func (ri *RunSliceIterator) HasNext() bool + func (ri *RunSliceIterator) NextRun() (Run, error)