pfordec

package
v0.0.0-...-d60b6d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 24, 2026 License: BSD-3-Clause Imports: 2 Imported by: 0

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).

func (*BlockDecoder) DecodeN

func (bd *BlockDecoder) DecodeN(input []byte, output []uint32) (read int)

DecodeN decodes len(output) uint32s from input to output.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL