compression

package
v0.0.0-...-c2b06ca Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 26, 2017 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bzip2Decompressor

func Bzip2Decompressor(r io.Reader) (io.Reader, error)

Bzip2Decompressor is a DecompressorFunc for the bzip2 compression algorithm.

func GzipDecompressor

func GzipDecompressor(r io.Reader) (io.Reader, error)

GzipDecompressor is a DecompressorFunc for the gzip compression algorithm.

func XzDecompressor

func XzDecompressor(r io.Reader) (io.Reader, error)

XzDecompressor is a DecompressorFunc for the xz compression algorithm.

Types

type DecompressorFunc

type DecompressorFunc func(io.Reader) (io.Reader, error)

DecompressorFunc returns the decompressed stream, given a compressed stream.

func DetectCompression

func DetectCompression(input io.Reader) (DecompressorFunc, io.Reader, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL