Documentation ¶
Index ¶
- Constants
- func DecodeBooleanBlock(in []byte, out *[]byte, ctx *CoderContext) ([]bool, error)
- func DecodeFloatBlock(in []byte, out *[]byte, ctx *CoderContext) ([]float64, error)
- func DecodeIntegerBlock(in []byte, out *[]byte, ctx *CoderContext) ([]int64, error)
- func DecodeStringBlock(in []byte, out *[]byte, dstOffset *[]uint32, ctx *CoderContext) ([]byte, []uint32, error)
- func DecodeTimestampBlock(in []byte, out *[]byte, ctx *CoderContext) ([]int64, error)
- func DecodeUnsignedBlock(in []byte, out *[]byte, ctx *CoderContext) ([]uint64, error)
- func EncodeBooleanBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
- func EncodeFloatBlock(in []byte, out []byte, ctx *CoderContext) ([]byte, error)
- func EncodeIntegerBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
- func EncodeStringBlock(in []byte, offset []uint32, out []byte, ctx *CoderContext) ([]byte, error)
- func EncodeTimestampBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
- func EncodeUnsignedBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
- func IsBlockEmpty(typ uint8) bool
- func IsBlockFull(typ uint8) bool
- func IsBlockOne(typ uint8) bool
- func PutDataCoder(coder DataCoder)
- func RewriteTypeToEmpty(typ uint8) uint8
- func RewriteTypeToFull(typ uint8) uint8
- func ZSTDCompressBound(srcSize int) int
- func ZigZagDecode(v uint64) int64
- func ZigZagEncode(v int64) uint64
- type Boolean
- type BytesBuffer
- func (w *BytesBuffer) Bytes() []byte
- func (w *BytesBuffer) Len() int
- func (w *BytesBuffer) Read(p []byte) (n int, err error)
- func (w *BytesBuffer) ReadByte() (b byte, err error)
- func (w *BytesBuffer) Reset(b []byte)
- func (w *BytesBuffer) Write(p []byte) (n int, err error)
- func (w *BytesBuffer) WriteByte(b byte) error
- type CoderContext
- func (ctx *CoderContext) GetBoolCoder() *Boolean
- func (ctx *CoderContext) GetFloatCoder() *Float
- func (ctx *CoderContext) GetIntCoder() *Integer
- func (ctx *CoderContext) GetStringCoder() *String
- func (ctx *CoderContext) GetTimeCoder() *Time
- func (ctx *CoderContext) Release()
- func (ctx *CoderContext) SetBoolCoder(boolCoder *Boolean)
- func (ctx *CoderContext) SetFloatCoder(floatCoder *Float)
- func (ctx *CoderContext) SetIntCoder(intCoder *Integer)
- func (ctx *CoderContext) SetStringCoder(stringCoder *String)
- func (ctx *CoderContext) SetTimeCoder(timeCoder *Time)
- type DataCoder
- type Float
- type Integer
- type String
- type Time
Constants ¶
View Source
const ( // BlockFloat64 designates a block encodes float64 values. BlockFloat64 = byte(influx.Field_Type_Float) // BlockInteger designates a block encodes int64 values. BlockInteger = byte(influx.Field_Type_Int) // BlockBoolean designates a block encodes boolean values. BlockBoolean = byte(influx.Field_Type_Boolean) // BlockString designates a block encodes string values. BlockString = byte(influx.Field_Type_String) // BlockTag designates a block encodes tag values. BlockTag = byte(influx.Field_Type_Tag) BlockOneBegin = 16 BlockFloat64One = 17 BlockIntegerOne = 18 BlockBooleanOne = 19 BlockStringOne = 20 BlockOneEnd = 21 BlockFullBegin = 30 BlockFloat64Full = 31 BlockIntegerFull = 32 BlockBooleanFull = 33 BlockStringFull = 34 BlockFullEnd = 35 BlockEmptyBegin = 40 BlockFloat64Empty = 41 BlockIntegerEmpty = 42 BlockBooleanEmpty = 43 BlockStringEmpty = 44 BlockEmptyEnd = 45 )
View Source
const ( StringEncodingV1 uint32 = math.MaxUint32 StringEncodingV2 = math.MaxUint32 - 1 StringEncodingEnd = math.MaxUint32 - 2 )
View Source
const ( StringCompressedZstd = 2 StringCompressedLz4 = 3 )
Variables ¶
This section is empty.
Functions ¶
func DecodeBooleanBlock ¶
func DecodeBooleanBlock(in []byte, out *[]byte, ctx *CoderContext) ([]bool, error)
func DecodeFloatBlock ¶
func DecodeFloatBlock(in []byte, out *[]byte, ctx *CoderContext) ([]float64, error)
func DecodeIntegerBlock ¶
func DecodeIntegerBlock(in []byte, out *[]byte, ctx *CoderContext) ([]int64, error)
func DecodeStringBlock ¶
func DecodeTimestampBlock ¶
func DecodeTimestampBlock(in []byte, out *[]byte, ctx *CoderContext) ([]int64, error)
func DecodeUnsignedBlock ¶
func DecodeUnsignedBlock(in []byte, out *[]byte, ctx *CoderContext) ([]uint64, error)
func EncodeBooleanBlock ¶
func EncodeBooleanBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
func EncodeFloatBlock ¶
func EncodeFloatBlock(in []byte, out []byte, ctx *CoderContext) ([]byte, error)
func EncodeIntegerBlock ¶
func EncodeIntegerBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
func EncodeStringBlock ¶
func EncodeTimestampBlock ¶
func EncodeTimestampBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
func EncodeUnsignedBlock ¶
func EncodeUnsignedBlock(in, out []byte, ctx *CoderContext) ([]byte, error)
func IsBlockEmpty ¶ added in v1.2.0
func IsBlockFull ¶ added in v1.2.0
func IsBlockOne ¶ added in v1.2.0
func PutDataCoder ¶
func PutDataCoder(coder DataCoder)
func RewriteTypeToEmpty ¶ added in v1.2.0
func RewriteTypeToFull ¶ added in v1.2.0
func ZSTDCompressBound ¶
func ZigZagDecode ¶
func ZigZagEncode ¶
ZigZagEncode ZigZag encoding maps signed integers to unsigned integers from: https://developers.google.com/protocol-buffers/docs/encoding
Types ¶
type Boolean ¶
type Boolean struct {
// contains filtered or unexported fields
}
func GetBoolCoder ¶
func GetBoolCoder() *Boolean
func (*Boolean) SetEncodingType ¶
type BytesBuffer ¶
type BytesBuffer struct {
// contains filtered or unexported fields
}
func NewBytesBuffer ¶
func NewBytesBuffer(buf []byte) *BytesBuffer
func (*BytesBuffer) Bytes ¶
func (w *BytesBuffer) Bytes() []byte
func (*BytesBuffer) Len ¶
func (w *BytesBuffer) Len() int
func (*BytesBuffer) ReadByte ¶
func (w *BytesBuffer) ReadByte() (b byte, err error)
func (*BytesBuffer) Reset ¶
func (w *BytesBuffer) Reset(b []byte)
func (*BytesBuffer) WriteByte ¶
func (w *BytesBuffer) WriteByte(b byte) error
type CoderContext ¶
type CoderContext struct {
// contains filtered or unexported fields
}
func NewCoderContext ¶
func NewCoderContext() *CoderContext
func (*CoderContext) GetBoolCoder ¶
func (ctx *CoderContext) GetBoolCoder() *Boolean
func (*CoderContext) GetFloatCoder ¶
func (ctx *CoderContext) GetFloatCoder() *Float
func (*CoderContext) GetIntCoder ¶
func (ctx *CoderContext) GetIntCoder() *Integer
func (*CoderContext) GetStringCoder ¶
func (ctx *CoderContext) GetStringCoder() *String
func (*CoderContext) GetTimeCoder ¶
func (ctx *CoderContext) GetTimeCoder() *Time
func (*CoderContext) Release ¶
func (ctx *CoderContext) Release()
func (*CoderContext) SetBoolCoder ¶
func (ctx *CoderContext) SetBoolCoder(boolCoder *Boolean)
func (*CoderContext) SetFloatCoder ¶
func (ctx *CoderContext) SetFloatCoder(floatCoder *Float)
func (*CoderContext) SetIntCoder ¶
func (ctx *CoderContext) SetIntCoder(intCoder *Integer)
func (*CoderContext) SetStringCoder ¶
func (ctx *CoderContext) SetStringCoder(stringCoder *String)
func (*CoderContext) SetTimeCoder ¶
func (ctx *CoderContext) SetTimeCoder(timeCoder *Time)
type Float ¶
type Float struct {
// contains filtered or unexported fields
}
func GetFloatCoder ¶
func GetFloatCoder() *Float
func (*Float) SetEncodingType ¶
type Integer ¶
type Integer struct {
// contains filtered or unexported fields
}
func GetIntCoder ¶
func GetIntCoder() *Integer
func (*Integer) SetEncodingType ¶
type String ¶
type String struct {
// contains filtered or unexported fields
}
func GetStringCoder ¶
func GetStringCoder() *String
func (*String) MaxEncodedLen ¶
func (*String) SetEncodingType ¶
type Time ¶
type Time struct {
// contains filtered or unexported fields
}
func GetTimeCoder ¶
func GetTimeCoder() *Time
func (*Time) SetEncodingType ¶
Click to show internal directories.
Click to hide internal directories.