MCPcopy
hub / github.com/containerd/containerd / Extension

Method Extension

pkg/archive/compression/compression.go:258–268  ·  view source on GitHub ↗

Extension returns the extension of a file that uses the specified compression algorithm.

()

Source from the content-addressed store, hash-verified

256
257// Extension returns the extension of a file that uses the specified compression algorithm.
258func (compression *Compression) Extension() string {
259 switch *compression {
260 case Gzip:
261 return "gz"
262 case Zstd:
263 return "zst"
264 case Unknown:
265 return "unknown"
266 }
267 return ""
268}
269
270func gzipDecompress(ctx context.Context, buf io.Reader) (io.ReadCloser, error) {
271 initGzip.Do(func() {

Callers 2

DecompressStreamFunction · 0.80
CompressStreamFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected