clickhouse: github.com/kshvakov/clickhouse/lib/binary Index | Files

package binary

import "github.com/kshvakov/clickhouse/lib/binary"

Index

Package Files

compress_reader.go compress_settings.go compress_writer.go decoder.go encoder.go

Constants

const (
    NONE CompressionMethodByte = 0x02
    LZ4                        = 0x82
    ZSTD                       = 0x90
)
const (
    // ChecksumSize is 128bits for cityhash102 checksum
    ChecksumSize = 16
    // CompressHeader magic + compressed_size + uncompressed_size
    CompressHeaderSize = 1 + 4 + 4

    // HeaderSize
    HeaderSize = ChecksumSize + CompressHeaderSize
    // BlockMaxSize 1MB
    BlockMaxSize = 1 << 10
)

func NewCompressReader Uses

func NewCompressReader(r io.Reader) *compressReader

NewCompressReader wrap the io.Reader

func NewCompressWriter Uses

func NewCompressWriter(w io.Writer) *compressWriter

NewCompressWriter wrap the io.Writer

func Str2Bytes Uses

func Str2Bytes(str string) []byte

type CompressionMethodByte Uses

type CompressionMethodByte byte

type Decoder Uses

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

func NewDecoder Uses

func NewDecoder(input io.Reader) *Decoder

func (*Decoder) Bool Uses

func (decoder *Decoder) Bool() (bool, error)

func (*Decoder) Fixed Uses

func (decoder *Decoder) Fixed(ln int) ([]byte, error)

func (*Decoder) Float32 Uses

func (decoder *Decoder) Float32() (float32, error)

func (*Decoder) Float64 Uses

func (decoder *Decoder) Float64() (float64, error)

func (*Decoder) Get Uses

func (decoder *Decoder) Get() io.Reader

func (*Decoder) Int16 Uses

func (decoder *Decoder) Int16() (int16, error)

func (*Decoder) Int32 Uses

func (decoder *Decoder) Int32() (int32, error)

func (*Decoder) Int64 Uses

func (decoder *Decoder) Int64() (int64, error)

func (*Decoder) Int8 Uses

func (decoder *Decoder) Int8() (int8, error)

func (*Decoder) ReadByte Uses

func (decoder *Decoder) ReadByte() (byte, error)

func (*Decoder) SelectCompress Uses

func (decoder *Decoder) SelectCompress(compress bool)

func (*Decoder) String Uses

func (decoder *Decoder) String() (string, error)

func (*Decoder) UInt16 Uses

func (decoder *Decoder) UInt16() (uint16, error)

func (*Decoder) UInt32 Uses

func (decoder *Decoder) UInt32() (uint32, error)

func (*Decoder) UInt64 Uses

func (decoder *Decoder) UInt64() (uint64, error)

func (*Decoder) UInt8 Uses

func (decoder *Decoder) UInt8() (uint8, error)

func (*Decoder) Uvarint Uses

func (decoder *Decoder) Uvarint() (uint64, error)

type Encoder Uses

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

func NewEncoder Uses

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Bool Uses

func (enc *Encoder) Bool(v bool) error

func (*Encoder) Float32 Uses

func (enc *Encoder) Float32(v float32) error

func (*Encoder) Float64 Uses

func (enc *Encoder) Float64(v float64) error

func (*Encoder) Flush Uses

func (enc *Encoder) Flush() error

func (*Encoder) Get Uses

func (enc *Encoder) Get() io.Writer

func (*Encoder) Int16 Uses

func (enc *Encoder) Int16(v int16) error

func (*Encoder) Int32 Uses

func (enc *Encoder) Int32(v int32) error

func (*Encoder) Int64 Uses

func (enc *Encoder) Int64(v int64) error

func (*Encoder) Int8 Uses

func (enc *Encoder) Int8(v int8) error

func (*Encoder) RawString Uses

func (enc *Encoder) RawString(str []byte) error

func (*Encoder) SelectCompress Uses

func (enc *Encoder) SelectCompress(compress bool)

func (*Encoder) String Uses

func (enc *Encoder) String(v string) error

func (*Encoder) UInt16 Uses

func (enc *Encoder) UInt16(v uint16) error

func (*Encoder) UInt32 Uses

func (enc *Encoder) UInt32(v uint32) error

func (*Encoder) UInt64 Uses

func (enc *Encoder) UInt64(v uint64) error

func (*Encoder) UInt8 Uses

func (enc *Encoder) UInt8(v uint8) error

func (*Encoder) Uvarint Uses

func (enc *Encoder) Uvarint(v uint64) error

func (*Encoder) Write Uses

func (enc *Encoder) Write(b []byte) (int, error)

type FixedReader Uses

type FixedReader interface {
    Fixed(ln int) ([]byte, error)
}

type WriteFlusher Uses

type WriteFlusher interface {
    Flush() error
}

Package binary imports 8 packages (graph) and is imported by 3 packages. Updated 2019-06-13. Refresh now. Tools for package owners.