Documentation
¶
Overview ¶
Package lib provides encoder and decoder for base64-encoded compressed string.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Deflate = newDataFormat( func(buf io.Writer) io.WriteCloser { w, _ := flate.NewWriter(buf, flate.BestCompression) return w }, func(buf io.Reader) (io.ReadCloser, error) { return flate.NewReader(buf), nil }, )
Deflate is a wrapper of DEFLATE compressed data format, provided by compress/flate.
View Source
var LzwLSB = newDataFormat( func(buf io.Writer) io.WriteCloser { return lzw.NewWriter(buf, lzw.LSB, lzwLitWidth) }, func(buf io.Reader) (io.ReadCloser, error) { return lzw.NewReader(buf, lzw.LSB, lzwLitWidth), nil }, )
LzwMSB is a wrapper of Lempel-Ziv-Welch compressed data format using Least Significant Bits, provided by compress/lzw.
View Source
var LzwMSB = newDataFormat( func(buf io.Writer) io.WriteCloser { return lzw.NewWriter(buf, lzw.MSB, lzwLitWidth) }, func(buf io.Reader) (io.ReadCloser, error) { return lzw.NewReader(buf, lzw.MSB, lzwLitWidth), nil }, )
LzwMSB is a wrapper of Lempel-Ziv-Welch compressed data format using Most Significant Bits, provided by compress/lzw.
View Source
var Plain = newDataFormat( func(buf io.Writer) io.WriteCloser { return NewPlainWriter(buf) }, func(buf io.Reader) (io.ReadCloser, error) { return NewPlainReader(buf), nil }, )
Plain is a wrapper of plain text format, no compression.
Functions ¶
This section is empty.
Types ¶
type PlainReader ¶
type PlainReader struct {
// contains filtered or unexported fields
}
func NewPlainReader ¶
func NewPlainReader(r io.Reader) *PlainReader
func (*PlainReader) Close ¶
func (*PlainReader) Close() error
type PlainWriter ¶
type PlainWriter struct {
// contains filtered or unexported fields
}
func NewPlainWriter ¶
func NewPlainWriter(w io.Writer) *PlainWriter
func (*PlainWriter) Close ¶
func (*PlainWriter) Close() error
Click to show internal directories.
Click to hide internal directories.