Documentation ¶
Index ¶
- Constants
- func NewCompressReader(r io.Reader) *compressReader
- func NewCompressWriter(w io.Writer) *compressWriter
- func Str2Bytes(str string) []byte
- type CompressionMethodByte
- type Decoder
- func (decoder *Decoder) Bool() (bool, error)
- func (decoder *Decoder) Fixed(ln int) ([]byte, error)
- func (decoder *Decoder) Float32() (float32, error)
- func (decoder *Decoder) Float64() (float64, error)
- func (decoder *Decoder) Get() io.Reader
- func (decoder *Decoder) Int16() (int16, error)
- func (decoder *Decoder) Int32() (int32, error)
- func (decoder *Decoder) Int64() (int64, error)
- func (decoder *Decoder) Int8() (int8, error)
- func (decoder *Decoder) ReadByte() (byte, error)
- func (decoder *Decoder) SelectCompress(compress bool)
- func (decoder *Decoder) String() (string, error)
- func (decoder *Decoder) UInt16() (uint16, error)
- func (decoder *Decoder) UInt32() (uint32, error)
- func (decoder *Decoder) UInt64() (uint64, error)
- func (decoder *Decoder) UInt8() (uint8, error)
- func (decoder *Decoder) Uvarint() (uint64, error)
- type Encoder
- func (enc *Encoder) Bool(v bool) error
- func (enc *Encoder) Float32(v float32) error
- func (enc *Encoder) Float64(v float64) error
- func (enc *Encoder) Flush() error
- func (enc *Encoder) Get() io.Writer
- func (enc *Encoder) Int16(v int16) error
- func (enc *Encoder) Int32(v int32) error
- func (enc *Encoder) Int64(v int64) error
- func (enc *Encoder) Int8(v int8) error
- func (enc *Encoder) RawString(str []byte) error
- func (enc *Encoder) SelectCompress(compress bool)
- func (enc *Encoder) String(v string) error
- func (enc *Encoder) UInt16(v uint16) error
- func (enc *Encoder) UInt32(v uint32) error
- func (enc *Encoder) UInt64(v uint64) error
- func (enc *Encoder) UInt8(v uint8) error
- func (enc *Encoder) Uvarint(v uint64) error
- func (enc *Encoder) Write(b []byte) (int, error)
- type FixedReader
- type WriteFlusher
Constants ¶
View Source
const ( NONE CompressionMethodByte = 0x02 LZ4 = 0x82 ZSTD = 0x90 )
View Source
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 << 20 )
Variables ¶
This section is empty.
Functions ¶
func NewCompressReader ¶ added in v1.3.6
NewCompressReader wrap the io.Reader
func NewCompressWriter ¶ added in v1.3.6
NewCompressWriter wrap the io.Writer
Types ¶
type CompressionMethodByte ¶ added in v1.3.6
type CompressionMethodByte byte
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoderWithCompress ¶ added in v1.4.3
func (*Decoder) SelectCompress ¶ added in v1.3.6
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoderWithCompress ¶ added in v1.4.3
func (*Encoder) SelectCompress ¶ added in v1.3.6
type FixedReader ¶
type WriteFlusher ¶ added in v1.3.6
type WriteFlusher interface {
Flush() error
}
Click to show internal directories.
Click to hide internal directories.