encoders

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// Float64NonIdenticalBit indicates that the value is not identical to the previous value.
	Float64NonIdenticalBit = 0b1000000000000

	// Float64NewLeadingTrailingBit indicates that encoding uses new leading/trailing bit counts.
	Float64NewLeadingTrailingBit = 0b0100000000000

	// Float64LeadingBitMask contains bits that store the leading bit count.
	Float64LeadingBitMask = 0b0011111000000

	// Float64SigBitMask contains bits that store the trailing bit count.
	Float64SigBitMask = 0b0000000111111

	// Float64SigBitsCount the of bits used by Float64SigBitMask, same as the
	// number of bits to shift Float64LeadingBitMask to get its value.
	Float64SigBitsCount = 6
)

Variables

View Source
var ErrInvalidRefNum = errors.New("invalid RefNum, out of dictionary range")

Functions

This section is empty.

Types

type BoolDecoder

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

func (*BoolDecoder) Continue

func (d *BoolDecoder) Continue()

func (*BoolDecoder) Decode

func (d *BoolDecoder) Decode(dst *bool) error

func (*BoolDecoder) Init

func (d *BoolDecoder) Init(columns *pkg.ReadColumnSet) error

func (*BoolDecoder) Reset

func (d *BoolDecoder) Reset()

type BoolEncoder

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

func (*BoolEncoder) CollectColumns

func (e *BoolEncoder) CollectColumns(columnSet *pkg.WriteColumnSet)

func (*BoolEncoder) Encode

func (e *BoolEncoder) Encode(val bool)

func (*BoolEncoder) Init

func (e *BoolEncoder) Init(limiter *pkg.SizeLimiter, columns *pkg.WriteColumnSet) error

func (*BoolEncoder) Reset

func (e *BoolEncoder) Reset()

func (*BoolEncoder) WriteTo

func (e *BoolEncoder) WriteTo(buf *pkg.BytesWriter)

type BytesDecoder

type BytesDecoder struct {
	StringDecoder
}

func (*BytesDecoder) Continue

func (d *BytesDecoder) Continue()

func (*BytesDecoder) Decode

func (d *BytesDecoder) Decode(dst *pkg.Bytes) error

func (*BytesDecoder) Init

func (d *BytesDecoder) Init(columns *pkg.ReadColumnSet) error

type BytesDictDecoder added in v0.0.8

type BytesDictDecoder struct {
	StringDictDecoder
}

BytesDictDecoder implements a dictionary-based bytes decoder.

func (*BytesDictDecoder) Continue added in v0.0.8

func (d *BytesDictDecoder) Continue()

func (*BytesDictDecoder) Decode added in v0.0.8

func (d *BytesDictDecoder) Decode(dst *pkg.Bytes) error

func (*BytesDictDecoder) Init added in v0.0.8

func (d *BytesDictDecoder) Init(dict *BytesDictDecoderDict, columns *pkg.ReadColumnSet) error

type BytesDictDecoderDict added in v0.0.8

type BytesDictDecoderDict StringDictDecoderDict

BytesDictDecoderDict maintains the dictionary for BytesDictDecoder.

func (*BytesDictDecoderDict) Init added in v0.0.8

func (d *BytesDictDecoderDict) Init()

type BytesDictEncoder added in v0.0.8

type BytesDictEncoder struct {
	StringDictEncoder
}

BytesDictEncoder implements a dictionary-based bytes encoder.

func (*BytesDictEncoder) Encode added in v0.0.8

func (e *BytesDictEncoder) Encode(val pkg.Bytes)

func (*BytesDictEncoder) Init added in v0.0.8

func (e *BytesDictEncoder) Init(
	dict *BytesDictEncoderDict, limiter *pkg.SizeLimiter, columns *pkg.WriteColumnSet,
) error

type BytesDictEncoderDict added in v0.0.8

type BytesDictEncoderDict StringDictEncoderDict

BytesDictEncoderDict maintains the dictionary for BytesDictEncoder.

func (*BytesDictEncoderDict) Init added in v0.0.8

func (e *BytesDictEncoderDict) Init(limiter *pkg.SizeLimiter)

func (*BytesDictEncoderDict) Reset added in v0.0.8

func (e *BytesDictEncoderDict) Reset()

type BytesEncoder

type BytesEncoder struct {
	StringEncoder
}

func (*BytesEncoder) Encode

func (e *BytesEncoder) Encode(val pkg.Bytes)

func (*BytesEncoder) Init

func (e *BytesEncoder) Init(limiter *pkg.SizeLimiter, columns *pkg.WriteColumnSet) error

type Float64Decoder

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

func (*Float64Decoder) Continue

func (d *Float64Decoder) Continue()

func (*Float64Decoder) Decode

func (d *Float64Decoder) Decode(dst *float64) error

func (*Float64Decoder) Init

func (d *Float64Decoder) Init(columns *pkg.ReadColumnSet) error

func (*Float64Decoder) Reset

func (d *Float64Decoder) Reset()

type Float64Encoder

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

func (*Float64Encoder) CollectColumns

func (e *Float64Encoder) CollectColumns(columnSet *pkg.WriteColumnSet)

func (*Float64Encoder) Encode

func (e *Float64Encoder) Encode(val float64)

func (*Float64Encoder) Init

func (e *Float64Encoder) Init(limiter *pkg.SizeLimiter, columns *pkg.WriteColumnSet) error

func (*Float64Encoder) IsEqual

func (e *Float64Encoder) IsEqual(val float64) bool

func (*Float64Encoder) Reset

func (e *Float64Encoder) Reset()

func (*Float64Encoder) WriteTo

func (e *Float64Encoder) WriteTo(buf *pkg.BytesWriter)

type Int64Decoder

type Int64Decoder struct {
	Uint64Decoder
}

func (*Int64Decoder) Decode

func (d *Int64Decoder) Decode(dst *int64) error

type Int64Encoder

type Int64Encoder struct {
	Uint64Encoder
}

func (*Int64Encoder) Encode

func (e *Int64Encoder) Encode(val int64)

func (*Int64Encoder) IsEqual

func (e *Int64Encoder) IsEqual(val int64) bool

type StringDecoder

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

StringDecoder implements a basic string decoder.

func (*StringDecoder) Continue

func (d *StringDecoder) Continue()

func (*StringDecoder) Decode

func (d *StringDecoder) Decode(dst *string) error

func (*StringDecoder) Init

func (d *StringDecoder) Init(columns *pkg.ReadColumnSet) error

func (*StringDecoder) Reset

func (d *StringDecoder) Reset()

type StringDictDecoder added in v0.0.8

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

StringDictDecoder implements a dictionary-based string decoder. It decodes strings that were encoded using StringDictEncoder.

func (*StringDictDecoder) Continue added in v0.0.8

func (d *StringDictDecoder) Continue()

func (*StringDictDecoder) Decode added in v0.0.8

func (d *StringDictDecoder) Decode(dst *string) error

func (*StringDictDecoder) Init added in v0.0.8

func (*StringDictDecoder) Reset added in v0.0.8

func (d *StringDictDecoder) Reset()

type StringDictDecoderDict added in v0.0.8

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

StringDictDecoderDict maintains the dictionary for StringDictDecoder.

func (*StringDictDecoderDict) Init added in v0.0.8

func (d *StringDictDecoderDict) Init()

func (*StringDictDecoderDict) Reset added in v0.0.8

func (d *StringDictDecoderDict) Reset()

type StringDictEncoder added in v0.0.8

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

StringDictEncoder implements a dictionary-based string encoder. It maintains a dictionary of previously seen strings and encodes strings as either a reference to the dictionary or as a new string if it hasn't been seen before.

func (*StringDictEncoder) CollectColumns added in v0.0.8

func (e *StringDictEncoder) CollectColumns(columnSet *pkg.WriteColumnSet)

func (*StringDictEncoder) Encode added in v0.0.8

func (e *StringDictEncoder) Encode(val string)

func (*StringDictEncoder) Init added in v0.0.8

func (e *StringDictEncoder) Init(
	dict *StringDictEncoderDict, limiter *pkg.SizeLimiter, columns *pkg.WriteColumnSet,
) error

func (*StringDictEncoder) Reset added in v0.0.8

func (e *StringDictEncoder) Reset()

func (*StringDictEncoder) WriteTo added in v0.0.8

func (e *StringDictEncoder) WriteTo(buf *pkg.BytesWriter)

type StringDictEncoderDict added in v0.0.8

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

StringDictEncoderDict maintains the dictionary for StringDictEncoder.

func (*StringDictEncoderDict) Init added in v0.0.8

func (e *StringDictEncoderDict) Init(limiter *pkg.SizeLimiter)

func (*StringDictEncoderDict) Reset added in v0.0.8

func (e *StringDictEncoderDict) Reset()

type StringEncoder

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

StringEncoder implements a basic string encoder. It encodes strings by writing their length followed by their bytes. For dictionary-based encoding, see StringDictEncoder.

func (*StringEncoder) CollectColumns

func (e *StringEncoder) CollectColumns(columnSet *pkg.WriteColumnSet)

func (*StringEncoder) Encode

func (e *StringEncoder) Encode(val string)

func (*StringEncoder) Init

func (e *StringEncoder) Init(limiter *pkg.SizeLimiter, columns *pkg.WriteColumnSet) error

func (*StringEncoder) Reset

func (e *StringEncoder) Reset()

func (*StringEncoder) WriteTo

func (e *StringEncoder) WriteTo(buf *pkg.BytesWriter)

type Uint64Decoder

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

func (*Uint64Decoder) Continue

func (d *Uint64Decoder) Continue()

func (*Uint64Decoder) Decode

func (d *Uint64Decoder) Decode(dst *uint64) error

func (*Uint64Decoder) Init

func (d *Uint64Decoder) Init(columns *pkg.ReadColumnSet) error

func (*Uint64Decoder) Reset

func (d *Uint64Decoder) Reset()

type Uint64Encoder

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

func (*Uint64Encoder) CollectColumns

func (e *Uint64Encoder) CollectColumns(columnSet *pkg.WriteColumnSet)

func (*Uint64Encoder) Encode

func (e *Uint64Encoder) Encode(val uint64)

func (*Uint64Encoder) Init

func (e *Uint64Encoder) Init(limiter *pkg.SizeLimiter, columns *pkg.WriteColumnSet) error

func (*Uint64Encoder) IsEqual

func (e *Uint64Encoder) IsEqual(val uint64) bool

func (*Uint64Encoder) Reset

func (e *Uint64Encoder) Reset()

func (*Uint64Encoder) WriteTo

func (e *Uint64Encoder) WriteTo(buf *pkg.BytesWriter)

Jump to

Keyboard shortcuts

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