package v1util
import "github.com/google/go-containerregistry/pkg/v1/v1util"
Index ¶
- func GunzipReadCloser(r io.ReadCloser) (io.ReadCloser, error)
- func GzipReadCloser(r io.ReadCloser) io.ReadCloser
- func GzipReadCloserLevel(r io.ReadCloser, level int) io.ReadCloser
- func IsGzipped(r io.Reader) (bool, error)
- func VerifyReadCloser(r io.ReadCloser, h v1.Hash) (io.ReadCloser, error)
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 IsGzipped ¶
IsGzipped detects whether the input stream is compressed.
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.
Source Files ¶
and_closer.go verify.go zip.go
- Version
- v0.1.1
- Published
- Jun 11, 2020
- Platform
- js/wasm
- Imports
- 7 packages
- Last checked
- 2 hours ago –
Tools for package owners.