Documentation ¶
Index ¶
- func GunzipReadCloser(r io.ReadCloser) (io.ReadCloser, error)
- func GzipReadCloser(r io.ReadCloser) (io.ReadCloser, error)
- func GzipReadCloserLevel(r io.ReadCloser, level int) (io.ReadCloser, error)
- func IsGzipped(r io.Reader) (bool, error)
- func VerifyReadCloser(r io.ReadCloser, h v1.Hash) (io.ReadCloser, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GunzipReadCloser ¶
func GunzipReadCloser(r io.ReadCloser) (io.ReadCloser, error)
GunzipReadCloser reads compressed input data from the io.ReadCloser and returns an io.ReadCloser from which uncompessed data may be read.
func GzipReadCloser ¶
func GzipReadCloser(r io.ReadCloser) (io.ReadCloser, error)
GzipReadCloser reads uncompressed input data from the io.ReadCloser and returns an io.ReadCloser from which compressed data may be read. This uses gzip.BestSpeed for the compression level.
func GzipReadCloserLevel ¶
func GzipReadCloserLevel(r io.ReadCloser, level int) (io.ReadCloser, error)
GzipReadCloserLevel reads uncompressed input data from the io.ReadCloser and returns an io.ReadCloser from which compressed data may be read. Refer to compress/gzip for the level: https://golang.org/pkg/compress/gzip/#pkg-constants
func VerifyReadCloser ¶
func VerifyReadCloser(r io.ReadCloser, h v1.Hash) (io.ReadCloser, error)
VerifyReadCloser wraps the given io.ReadCloser to verify that its contents match the provided v1.Hash before io.EOF is returned.
Types ¶
This section is empty.