packer

package
v0.72.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package packer implements packaging of various types into bytes

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompressDeltaBitpackUint32 added in v0.72.0

func CompressDeltaBitpackUint32(dst []byte, values, buf []uint32) []byte

CompressDeltaBitpackUint32 works on top of intcomp library. intcomp can only compress slices which are multiple of 128, but this function supports slices of any length. Residual part is always less than 128 numbers and is not delta encoded, since we know the number of blocks with length non-multiple of 128 is very low.

func CompressDeltaBitpackUint64 added in v0.72.0

func CompressDeltaBitpackUint64(dst []byte, values, buf []uint64) []byte

CompressDeltaBitpackUint64 works on top of intcomp library. intcomp can only compress uint64 slices which are multiple of 256, but this function supports slices of any length. Residual part is always less than 256 uint64 numbers and is not delta encoded, since we know the number of blocks with length non-multiple of 256 is very low.

func DecompressDeltaBitpackUint32 added in v0.72.0

func DecompressDeltaBitpackUint32(data []byte, buf, compressed []uint32) ([]byte, []uint32, error)

func DecompressDeltaBitpackUint64 added in v0.72.0

func DecompressDeltaBitpackUint64(data []byte, buf, compressed []uint64) ([]byte, []uint64, error)

Types

type BytesUnpacker

type BytesUnpacker struct {
	// contains filtered or unexported fields
}

func NewBytesUnpacker

func NewBytesUnpacker(data []byte) *BytesUnpacker

func (*BytesUnpacker) GetBinary

func (u *BytesUnpacker) GetBinary() []byte

func (*BytesUnpacker) GetUint32

func (u *BytesUnpacker) GetUint32() uint32

func (*BytesUnpacker) GetVarint

func (u *BytesUnpacker) GetVarint() (int64, error)

func (*BytesUnpacker) Len

func (u *BytesUnpacker) Len() int

Jump to

Keyboard shortcuts

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