Documentation
¶
Overview ¶
Package encoding provides tag value encoding functionality with optimal compression for different data types including int64, float64, and other types using dictionary encoding with fallback to plain encoding with zstd compression.
Index ¶
- Constants
- func DecodeTagValues(dst [][]byte, decoder *encoding.BytesBlockDecoder, bb *bytes.Buffer, ...) ([][]byte, error)
- func EncodeTagValues(bb *bytes.Buffer, values [][]byte, valueType pbv1.ValueType) error
- func MarshalVarArray(dest, src []byte) []byte
- func UnmarshalVarArray(dest, src []byte) ([]byte, []byte, error)
Constants ¶
const ( // EntityDelimiter is the delimiter for entities in a variable-length array. EntityDelimiter = '|' // Escape is the escape character for entities in a variable-length array. Escape = '\\' )
Variables ¶
This section is empty.
Functions ¶
func DecodeTagValues ¶
func DecodeTagValues(dst [][]byte, decoder *encoding.BytesBlockDecoder, bb *bytes.Buffer, valueType pbv1.ValueType, count int) ([][]byte, error)
DecodeTagValues decodes tag values based on the value type.
func EncodeTagValues ¶
EncodeTagValues encodes tag values based on the value type with optimal compression. For int64: uses delta encoding with first value storage. For float64: converts to decimal integers with exponent, then delta encoding. For other types: uses dictionary encoding, falls back to plain with zstd compression.
func MarshalVarArray ¶
MarshalVarArray marshals a byte slice into a variable-length array format. It escapes delimiter and escape characters within the source slice.
Types ¶
This section is empty.