Documentation
¶
Overview ¶
Package packer implements packaging of various types into bytes
Index ¶
- func CompressDeltaBitpackUint32(dst []byte, values, buf []uint32) []byte
- func CompressDeltaBitpackUint64(dst []byte, values, buf []uint64) []byte
- func DecompressDeltaBitpackUint32(data []byte, buf, compressed []uint32) ([]byte, []uint32, error)
- func DecompressDeltaBitpackUint64(data []byte, buf, compressed []uint64) ([]byte, []uint64, error)
- type BytesUnpacker
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompressDeltaBitpackUint32 ¶ added in v0.72.0
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
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
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