Documentation
¶
Index ¶
- Constants
- func NewCompressReader(r io.Reader) *compressReader
- func NewCompressWriter(w io.Writer) *compressWriter
- type CompressionMethodByte
- type Decoder
- func (dec *Decoder) Bool() (bool, error)
- func (dec *Decoder) GetInput() io.Reader
- func (dec *Decoder) GetUvarInput() UvarintReader
- func (dec *Decoder) Int32() (int32, error)
- func (dec *Decoder) IsCompressed() bool
- func (dec *Decoder) Read(b []byte) (int, error)
- func (dec *Decoder) SetCompress(compress bool)
- func (dec *Decoder) String() (string, error)
- func (dec *Decoder) UInt32() (uint32, error)
- func (dec *Decoder) UInt64() (uint64, error)
- func (dec *Decoder) Uvarint() (uint64, error)
- type Encoder
- func (enc *Encoder) Bool(b bool) error
- func (enc *Encoder) Float32(f float32) error
- func (enc *Encoder) Float64(f float64) error
- func (enc *Encoder) Flush() error
- func (enc *Encoder) GetOutput() io.Writer
- func (enc *Encoder) Int32(v int32) error
- func (enc *Encoder) IsCompressed() bool
- func (enc *Encoder) SelectCompress(compress bool)
- func (enc *Encoder) String(s string) error
- func (enc *Encoder) UInt32(v uint32) error
- func (enc *Encoder) UInt64(v uint64) error
- func (enc *Encoder) Uvarint(i uint64) error
- func (enc *Encoder) Write(p []byte) (n int, err error)
- type Flusher
- type UvarintReader
- 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 ¶
NewCompressReader wrap the io.Reader
func NewCompressWriter ¶
NewCompressWriter wrap the io.Writer
Types ¶
type CompressionMethodByte ¶
type CompressionMethodByte byte
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
func NewDecoder ¶
func NewDecoderWithCompress ¶
func (*Decoder) GetUvarInput ¶
func (dec *Decoder) GetUvarInput() UvarintReader
func (*Decoder) IsCompressed ¶
func (*Decoder) SetCompress ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
func NewEncoderWithCompress ¶
func (*Encoder) IsCompressed ¶
func (*Encoder) SelectCompress ¶
type UvarintReader ¶
type WriteFlusher ¶
type WriteFlusher interface {
Flush() error
}
Click to show internal directories.
Click to hide internal directories.