Documentation ¶
Overview ¶
Package bzip2 implements reading and writing of bzip2 format compressed files.
Index ¶
Constants ¶
const ( BestSpeed = flate.BestSpeed BestCompression = flate.BestCompression )
These constants are copied from the flate package, so that code does not also have to import "compress/flate".
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Writer ¶
type Writer struct {
// contains filtered or unexported fields
}
Writer is an io.WriteCloser. Writes to a Writer are compressed and written to an underlying io.Writer.
func NewWriter ¶
NewWriter returns a new Writer. Writes to the returned writer are compressed and written to w.
It is the caller's responsibility to call Close on the Writer when done. Writes may be buffered and not flushed until Close.
func NewWriterLevel ¶
NewWriterLevel is like NewWriter but specifies the compression level.
The levels range from 1 (BestSpeed) to 9 (BestCompression); higher levels typically run slower but compress more.
If level is in the range [1, 9] then the error returned will be nil. Otherwise the error returned will be non-nil.
func (*Writer) Close ¶
Close closes the Writer, flushing any unwritten data to the underlying io.Writer, but does not close the underlying io.Writer.
Directories ¶
Path | Synopsis |
---|---|
internal
|
|
bits
Package bits provides access to read and write values bit-by-bit.
|
Package bits provides access to read and write values bit-by-bit. |
bwt
Package bwt implements the Burrows-Wheeler Transform.
|
Package bwt implements the Burrows-Wheeler Transform. |
crc32
Package crc32 implements the IEEE CRC-32 checksum.
|
Package crc32 implements the IEEE CRC-32 checksum. |
huffman
Package huffman implements Huffman prefix coding.
|
Package huffman implements Huffman prefix coding. |
mtf
Package mtf implements the move-to-front transform.
|
Package mtf implements the move-to-front transform. |
rle
Package rle implements a form of run-length encoding.
|
Package rle implements a form of run-length encoding. |
rle2
Package rle2 implements a form of run-length encoding.
|
Package rle2 implements a form of run-length encoding. |
symbols
Package symbols contains routines to manage symbols for contents.
|
Package symbols contains routines to manage symbols for contents. |
testhelpers
Package testhelpers provides helpers used in all the tests.
|
Package testhelpers provides helpers used in all the tests. |