Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoDecompress ¶
AutoDecompress takes a stream and returns an uncompressed version of the same stream. The caller must call Close() on the returned stream (even if the input does not need, or does not even support, closing!).
func Bzip2Decompressor ¶
func Bzip2Decompressor(r io.Reader) (io.ReadCloser, error)
Bzip2Decompressor is a DecompressorFunc for the bzip2 compression algorithm.
func GzipDecompressor ¶
func GzipDecompressor(r io.Reader) (io.ReadCloser, error)
GzipDecompressor is a DecompressorFunc for the gzip compression algorithm.
func XzDecompressor ¶
func XzDecompressor(r io.Reader) (io.ReadCloser, error)
XzDecompressor is a DecompressorFunc for the xz compression algorithm.
Types ¶
type DecompressorFunc ¶
type DecompressorFunc func(io.Reader) (io.ReadCloser, error)
DecompressorFunc returns the decompressed stream, given a compressed stream. The caller must call Close() on the decompressed stream (even if the compressed input stream does not need closing!).
func DetectCompression ¶
DetectCompression returns a DecompressorFunc if the input is recognized as a compressed format, nil otherwise. Because it consumes the start of input, other consumers must use the returned io.Reader instead to also read from the beginning.