Documentation ¶
Overview ¶
Package compression holds the algorithms for compressing the list of sorted lists of integers
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrGapShouldBeGreaterThanListLen tells that the list length is less or equal to // the skipping gap ErrGapShouldBeGreaterThanListLen = errors.New("gap should be greater than the list length") // ErrGapOverflow tells that it was at attempt to create // encoder/decoder skipping gap more than maxSkippingGap ErrGapOverflow = errors.New("gap value overflow") )
Functions ¶
Types ¶
type Decoder ¶
type Decoder interface { // Decode decodes the given byte array to the buf list // Returns a number of elements encoded Decode(in store.Input, buf []uint32) (int, error) }
Decoder represents entity for decoding given byte array to posting list
func SkippingDecoder ¶
SkippingDecoder creates a new instance of skipping decoder
type Encoder ¶
type Encoder interface { // Encode encodes the given positing list into the buf array // Returns a number of written bytes Encode(list []uint32, out store.Output) (int, error) }
Encoder represents entity for encoding given posting list to byte array
func BinaryEncoder ¶
func BinaryEncoder() Encoder
BinaryEncoder returns new instance of binaryEnc which encodes each Position in 4 bytes
func BitmapEncoder ¶
func BitmapEncoder() Encoder
BitmapEncoder returns new instance of bitmapEnc which compress the uint32 list with the roaring bitmap library
func SkippingEncoder ¶
SkippingEncoder creates a new instance of skipping encoder
Click to show internal directories.
Click to hide internal directories.