package compression
import "github.com/containerd/containerd/archive/compression"
Index ¶
- func CompressStream(dest io.Writer, compression Compression) (io.WriteCloser, error)
- func DecompressStream(archive io.Reader) (io.ReadCloser, error)
- type Compression
Functions ¶
func CompressStream ¶
func CompressStream(dest io.Writer, compression Compression) (io.WriteCloser, error)
CompressStream compresseses the dest with specified compression algorithm.
func DecompressStream ¶
func DecompressStream(archive io.Reader) (io.ReadCloser, error)
DecompressStream decompresses the archive and returns a ReaderCloser with the decompressed archive.
Types ¶
type Compression ¶
type Compression int
Compression is the state represents if compressed or not.
const ( // Uncompressed represents the uncompressed. Uncompressed Compression = iota // Gzip is gzip compression algorithm. Gzip )
func DetectCompression ¶
func DetectCompression(source []byte) Compression
DetectCompression detects the compression algorithm of the source.
func (*Compression) Extension ¶
func (compression *Compression) Extension() string
Extension returns the extension of a file that uses the specified compression algorithm.
Source Files ¶
- Version
- v1.1.0-rc.2
- Published
- Apr 13, 2018
- Platform
- linux/amd64
- Imports
- 6 packages
- Last checked
- 51 minutes ago –
Tools for package owners.