Documentation ¶
Index ¶
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
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
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.