Documentation
¶
Overview ¶
Package pfordec contains a Go TurboPFor decoder.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockDecoder ¶
type BlockDecoder struct {
// contains filtered or unexported fields
}
BlockDecoder decodes one or more TurboPFor blocks, each containing at most 256 values (for efficient SIMD processing).
A zero value BlockDecoder is ready to use. BlockDecoder is not safe for concurrent use by multiple goroutines.
func (*BlockDecoder) DecodeBlock ¶
func (bd *BlockDecoder) DecodeBlock(input []byte, output []uint32) (read int)
DecodeBlock decodes len(output)<=256 uint32s from input to output (one TurboPFor block).
type StreamDecoder ¶
type StreamDecoder struct {
// contains filtered or unexported fields
}
StreamDecoder decodes one full TurboPFor block at a time.
A zero value StreamDecoder is ready to use. StreamDecoder is not safe for concurrent use by multiple goroutines.
func (*StreamDecoder) DecodeBlock ¶
func (sd *StreamDecoder) DecodeBlock(input []byte, n int) (vals []uint32, read int)
DecodeBlock decodes one TurboPFor block and returns the decoded values.
Contract: the returned values are valid until the next DecodeBlock.