Documentation ¶
Index ¶
- Constants
- Variables
- func NopCloser(w io.Writer) io.WriteCloser
- type Allocator
- type Arena
- type Block
- func (b *Block) Cap() int
- func (b *Block) Clear()
- func (b Block) CompressedSize() int
- func (b Block) Compression() Compression
- func (b *Block) Copy(src *Block)
- func (b *Block) DecRef() int64
- func (b *Block) Decode(buf []byte, sz, stored int) error
- func (b Block) Elem(idx int) interface{}
- func (b *Block) Encode(buf *bytes.Buffer) (int, error)
- func (b *Block) Hashes(res []uint64) []uint64
- func (b *Block) HeapSize() int
- func (b *Block) IncRef() int64
- func (b *Block) IsDirty() bool
- func (b *Block) IsFloat() bool
- func (b *Block) IsIgnore() bool
- func (b *Block) IsInt() bool
- func (b *Block) IsSint() bool
- func (b *Block) IsUint() bool
- func (b *Block) Len() int
- func (b *Block) Less(i, j int) bool
- func (b *Block) MaxStoredSize() int
- func (b *Block) MinMax() (interface{}, interface{})
- func (b Block) RangeSlice(start, end int) interface{}
- func (b Block) RawSlice() interface{}
- func (b *Block) Release()
- func (b *Block) SetCompression(c Compression)
- func (b *Block) SetDirty()
- func (b *Block) Swap(i, j int)
- func (b Block) Type() BlockType
- type BlockType
- type Compression
- type Filter
- type SnappyWriter
Constants ¶
View Source
const ( BlockTime = BlockType(0) BlockInt64 = BlockType(1) BlockUint64 = BlockType(2) BlockFloat64 = BlockType(3) BlockBool = BlockType(4) BlockString = BlockType(5) BlockBytes = BlockType(6) BlockInt32 = BlockType(7) BlockInt16 = BlockType(8) BlockInt8 = BlockType(9) BlockUint32 = BlockType(10) BlockUint16 = BlockType(11) BlockUint8 = BlockType(12) BlockFloat32 = BlockType(13) BlockInt128 = BlockType(14) BlockInt256 = BlockType(15) )
Variables ¶
View Source
var ( BlockPool = &sync.Pool{ New: func() interface{} { return &Block{} }, } )
View Source
var BlockSz = int(reflect.TypeOf(Block{}).Size())
Functions ¶
Types ¶
type Block ¶
type Block struct { // TODO: measure performance impact of using an interface instead of direct slices // this can save up to 15x storage for slice headers / pointers // but adds another level of indirection on each data access // data interface{} Bytes dedup.ByteArray // re-used for bytes and strings Bits *vec.Bitset // -> Bitset Int64 []int64 // re-used by Decimal64, Timestamps Int32 []int32 // re-used by Decimal32 Int16 []int16 Int8 []int8 Uint64 []uint64 Uint32 []uint32 Uint16 []uint16 Uint8 []uint8 Float64 []float64 Float32 []float32 Int128 vec.Int128LLSlice // re-used by Decimal128, Int128 Int256 vec.Int256LLSlice // re-used by Decimal256, Int256 // contains filtered or unexported fields }
func AllocBlock ¶
func AllocBlock() *Block
func (Block) CompressedSize ¶
func (Block) Compression ¶
func (b Block) Compression() Compression
func (*Block) MaxStoredSize ¶
Estimate the upper bound of the space required to store a serialization of this block. The true size may be smaller due to efficient type-based compression and generic subsequent block compression.
This size hint is used to properly dimension the encoer/decoder buffers as is required by LZ4 and to avoid memcopy during write.
func (Block) RangeSlice ¶
func (*Block) SetCompression ¶
func (b *Block) SetCompression(c Compression)
type Compression ¶
type Compression byte
const ( NoCompression Compression = iota SnappyCompression LZ4Compression )
func (Compression) HeaderSize ¶
func (c Compression) HeaderSize(n int) int
func (Compression) String ¶
func (c Compression) String() string
type SnappyWriter ¶
type SnappyWriter struct {
// contains filtered or unexported fields
}
func NewSnappyWriter ¶
func NewSnappyWriter(w io.Writer) *SnappyWriter
func (*SnappyWriter) Close ¶
func (s *SnappyWriter) Close() error
Click to show internal directories.
Click to hide internal directories.