Documentation ¶
Overview ¶
Copyright (c) 2018-2020 Blockwatch Data Inc. Author: alex@blockwatch.cc
Original from: InfluxData, MIT https://github.com/influxdata/influxdb
Copyright (c) 2018-2022 Blockwatch Data Inc. Author: stefan@blockwatch.cc
Copyright (c) 2018-2020 Blockwatch Data Inc. Author: alex@blockwatch.cc
Original from: InfluxData, MIT https://github.com/influxdata/influxdb
Copyright (c) 2018-2022 Blockwatch Data Inc. Author: alex@blockwatch.cc
Original from: InfluxData, MIT https://github.com/influxdata/influxdb
Copyright (c) 2018-2020 Blockwatch Data Inc. Author: alex@blockwatch.cc
Original From: InfluxData, MIT https://github.com/influxdata/influxdb
Index ¶
- Constants
- func ArrayDecodeAllInt16(b []byte, dst []int16) ([]int16, error)
- func ArrayDecodeAllInt32(b []byte, dst []int32) ([]int32, error)
- func ArrayDecodeAllInt64(b []byte, dst []int64) ([]int64, error)
- func ArrayDecodeAllInt8(b []byte, dst []int8) ([]int8, error)
- func ArrayDecodeAllUint16(b []byte, dst []uint16) ([]uint16, error)
- func ArrayDecodeAllUint32(b []byte, dst []uint32) ([]uint32, error)
- func ArrayDecodeAllUint64(b []byte, dst []uint64) ([]uint64, error)
- func ArrayDecodeAllUint8(b []byte, dst []uint8) ([]uint8, error)
- func ArrayEncodeAllInt16(src []int16, w io.Writer) (int, error)
- func ArrayEncodeAllInt32(src []int32, w io.Writer) (int, error)
- func ArrayEncodeAllInt64(src []int64, w io.Writer) (int, error)
- func ArrayEncodeAllInt8(src []int8, w io.Writer) (int, error)
- func ArrayEncodeAllUint16(src []uint16, w io.Writer) (int, error)
- func ArrayEncodeAllUint32(src []uint32, w io.Writer) (int, error)
- func ArrayEncodeAllUint64(src []uint64, w io.Writer) (int, error)
- func ArrayEncodeAllUint8(src []uint8, w io.Writer) (int, error)
- func BitsetDecodeAll(b []byte, dst *vec.Bitset) (*vec.Bitset, error)
- func BitsetEncodeAll(src *vec.Bitset, w io.Writer) (int, error)
- func BitsetEncodedSize(b *vec.Bitset) int
- func Delta8DecodeUint64(data []uint64)
- func Delta8EncodeUint64(data []uint64) uint64
- func Float32ArrayEncodedSize(src []float32) int
- func Float64ArrayEncodedSize(src []float64) int
- func FloatArrayDecodeAll(b []byte, buf []float64) ([]float64, error)
- func FloatArrayEncodeAll(src []float64, w io.Writer) (int, error)
- func HasNegUint64(data []uint64) bool
- func Int128ArrayEncodedSize(src vec.Int128LLSlice) int
- func Int16ArrayEncodedSize(src []int16) int
- func Int256ArrayEncodedSize(src vec.Int256LLSlice) int
- func Int32ArrayEncodedSize(src []int32) int
- func Int64ArrayEncodedSize(src []int64) int
- func Int8ArrayEncodedSize(src []int8) int
- func MaxUint64(data []uint64) uint64
- func PackBytes(src []uint64, nbytes int, buf []byte) ([]byte, error)
- func ReintepretInt16ToUint16Slice(src []int16) []uint16
- func ReintepretInt32ToUint32Slice(src []int32) []uint32
- func ReintepretInt64ToUint64Slice(src []int64) []uint64
- func ReintepretInt8ToUint8Slice(src []int8) []uint8
- func ReintepretUint16ToInt16Slice(src []uint16) []int16
- func ReintepretUint32ToInt32Slice(src []uint32) []int32
- func ReintepretUint64ToInt64Slice(src []uint64) []int64
- func ReintepretUint8ToInt8Slice(src []uint8) []int8
- func TimeArrayDecodeAll(b []byte, dst []int64) ([]int64, error)
- func TimeArrayEncodeAll(src []int64, w io.Writer) (int, error)
- func TimeArrayEncodedSize(src []int64) int
- func Uint16ArrayEncodedSize(src []uint16) int
- func Uint32ArrayEncodedSize(src []uint32) int
- func Uint64ArrayEncodedSize(src []uint64) int
- func Uint8ArrayEncodedSize(src []uint8) int
- func UnpackBytes(src []byte, nbytes int, res []uint64) ([]uint64, error)
- func UnsafeGetBytes(s string) []byte
- func UnsafeGetString(b []byte) string
- func ZigZagDecode(v uint64) int64
- func ZigZagDecodeUint16(v uint16) int16
- func ZigZagDecodeUint32(v uint32) int32
- func ZigZagDecodeUint64(v uint64) int64
- func ZigZagDecodeUint8(v uint8) int8
- func ZigZagEncode(x int64) uint64
- func ZigZagEncodeInt16(x int16) uint16
- func ZigZagEncodeInt32(x int32) uint32
- func ZigZagEncodeInt64(x int64) uint64
- func ZigZagEncodeInt8(x int8) uint8
- func ZzDecodeInt64(data []int64)
- func ZzDecodeUint64(data []uint64)
- func ZzDeltaDecodeInt64(data []int64)
- func ZzDeltaDecodeUint64(data []uint64)
- func ZzDeltaEncodeUint64(data []uint64) uint64
- func ZzEncodeUint64(data []uint64) uint64
Constants ¶
const (
// same as in block
DefaultMaxPointsPerBlock = 1 << 16
)
Variables ¶
This section is empty.
Functions ¶
func BitsetEncodedSize ¶
func Delta8DecodeUint64 ¶
func Delta8DecodeUint64(data []uint64)
func Delta8EncodeUint64 ¶
func FloatArrayEncodeAll ¶
FloatArrayEncodeAll encodes src into b, returning b and any error encountered. The returned slice may be of a different length and capactity to b.
Currently only the float compression scheme used in Facebook's Gorilla is supported, so this method implements a batch oriented version of that.
func HasNegUint64 ¶
func Int128ArrayEncodedSize ¶
func Int128ArrayEncodedSize(src vec.Int128LLSlice) int
upper bound, may store uncompressed 64bit strides
func Int16ArrayEncodedSize ¶
upper bound, s8b may inflate
func Int256ArrayEncodedSize ¶
func Int256ArrayEncodedSize(src vec.Int256LLSlice) int
upper bound, may store uncompressed 64bit strides
func Int32ArrayEncodedSize ¶
upper bound, s8b may inflate
func Int64ArrayEncodedSize ¶
upper bound, may store uncompressed 64bit
func TimeArrayEncodeAll ¶
TimeArrayEncodeAll encodes src into b, returning b and any error encountered. The returned slice may be of a different length and capacity to b.
TimeArrayEncodeAll implements batch oriented versions of the six integer encoding types we support: uncompressed, simple8b and RLE and their zigzag encoded versions.
When timestamp values to be encoded are sorted, we use the first three algos, when unordered we perform zig-zag encoding to avoid large neg/pos numbers. This allows to still use simple8b even when timestamps are out of order.
When encoded, the values are first scaled then delta-encoded. The first value is the pre-scaled starting timestamp, subsequent values are the pre-scaled difference from the prior value.
Important: TimeArrayEncodeAll modifies the contents of src by using it as scratch space for delta encoded values. It is NOT SAFE to use src after passing it into TimeArrayEncodeAll.
func Uint64ArrayEncodedSize ¶
upper bound, may store uncompressed 64bit
func UnsafeGetString ¶
func ZigZagDecode ¶
func ZigZagDecodeUint16 ¶
ZigZagDecode converts a previously zigzag encoded uint64 back to a int64.
func ZigZagDecodeUint32 ¶
ZigZagDecode converts a previously zigzag encoded uint64 back to a int64.
func ZigZagDecodeUint64 ¶
ZigZagDecode converts a previously zigzag encoded uint64 back to a int64.
func ZigZagDecodeUint8 ¶
ZigZagDecode converts a previously zigzag encoded uint64 back to a int64.
func ZigZagEncode ¶
ZigZagEncode converts a int64 to a uint64 by zig zagging negative and positive values across even and odd numbers. Eg. [0,-1,1,-2] becomes [0, 1, 2, 3].
func ZigZagEncodeInt16 ¶
func ZigZagEncodeInt32 ¶
func ZigZagEncodeInt64 ¶
func ZigZagEncodeInt8 ¶
func ZzDecodeInt64 ¶
func ZzDecodeInt64(data []int64)
func ZzDecodeUint64 ¶
func ZzDecodeUint64(data []uint64)
func ZzDeltaDecodeInt64 ¶
func ZzDeltaDecodeInt64(data []int64)
func ZzDeltaDecodeUint64 ¶
func ZzDeltaDecodeUint64(data []uint64)
func ZzDeltaEncodeUint64 ¶
func ZzEncodeUint64 ¶
Types ¶
This section is empty.