Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewCompressor ¶
func NewCompressor(ct CompressionType, wc io.WriteCloser) io.WriteCloser
NewCompressor returns a Compressor instance.
func NewDecompressor ¶
func NewDecompressor(ct CompressionType, r io.ReadCloser) io.ReadCloser
NewDecompressor return a decompressor instance.
Types ¶
type CompressionType ¶
type CompressionType int32
CompressionType is the type of the compression.
const ( // NoCompression is the CompressionType value used to indicate not to use // any compression. NoCompression CompressionType = iota // Snappy is the CompressionType value used to indicate that google snappy // is used for data compression. Snappy )
type Compressor ¶
type Compressor struct {
// contains filtered or unexported fields
}
Compressor is a io.WriteCloser that compresses its input data to its underlying io.Writer.
type CountedWriter ¶
type CountedWriter struct {
// contains filtered or unexported fields
}
CountedWriter is a io.WriteCloser wrapper that keeps the total number of bytes written to the underlying writer.
func NewCountedWriter ¶
func NewCountedWriter(w io.WriteCloser) *CountedWriter
NewCountedWriter creates a new CountedWriter.
func (*CountedWriter) BytesWritten ¶
func (cw *CountedWriter) BytesWritten() uint64
BytesWritten returns the total number of bytes written.
func (*CountedWriter) Close ¶
func (cw *CountedWriter) Close() error
Close closes the underlying writer.
type Decompressor ¶
type Decompressor struct {
// contains filtered or unexported fields
}
Decompressor is a io.WriteCloser that decompresses data read from its underlying reader.
Click to show internal directories.
Click to hide internal directories.