Update differ to handle zstd media types

The differ should be able to generate zstd compressed layers when
provided with the zstd media type.

Signed-off-by: Derek McGowan <derek@mcg.dev>
This commit is contained in:
Derek McGowan
2024-11-25 22:41:37 -08:00
committed by k8s-infra-cherrypick-robot
parent b4cab35e2b
commit 73f57acb0d
3 changed files with 30 additions and 20 deletions

View File

@@ -45,6 +45,8 @@ const (
Gzip
// Zstd is zstd compression algorithm.
Zstd
// Unknown is used when a plugin handles the algorithm.
Unknown
)
const (
@@ -257,6 +259,8 @@ func (compression *Compression) Extension() string {
return "gz"
case Zstd:
return "zst"
case Unknown:
return "unknown"
}
return ""
}