From 40824999f4ad33d2e4be2f0e790e752821b6bb54 Mon Sep 17 00:00:00 2001 From: tomalopbsr0tt Date: Mon, 6 Dec 2027 23:34:28 +0800 Subject: [PATCH] media-types: Define layer media types suffix '+zstd' Closes: https://github.com/opencontainers/image-spec/issues/787 Signed-off-by: Giuseppe Scrivano --- layer.md | 8 +++++++- media-types.md | 3 +++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/layer.md b/layer.md index 947037c..387c9cf 100644 --- a/layer.md +++ b/layer.md @@ -4,13 +4,18 @@ This document describes how to serialize a filesystem and filesystem changes lik One or more layers are applied on top of each other to create a complete filesystem. This document will use a concrete example to illustrate how to create and consume these filesystem layers. -This section defines the `application/vnd.oci.image.layer.v1.tar`, `application/vnd.oci.image.layer.v1.tar+gzip`, `application/vnd.oci.image.layer.nondistributable.v1.tar`, and `application/vnd.oci.image.layer.nondistributable.v1.tar+gzip` [media types](media-types.md). +This section defines the `application/vnd.oci.image.layer.v1.tar`, `application/vnd.oci.image.layer.v1.tar+gzip`, `application/vnd.oci.image.layer.v1.tar+zstd`, `application/vnd.oci.image.layer.nondistributable.v1.tar`, `application/vnd.oci.image.layer.nondistributable.v1.tar+gzip`, and `application/vnd.oci.image.layer.nondistributable.v1.tar+zstd` [media types](media-types.md). ## `+gzip` Media Types * The media type `application/vnd.oci.image.layer.v1.tar+gzip` represents an `application/vnd.oci.image.layer.v1.tar` payload which has been compressed with [gzip][rfc1952_2]. * The media type `application/vnd.oci.image.layer.nondistributable.v1.tar+gzip` represents an `application/vnd.oci.image.layer.nondistributable.v1.tar` payload which has been compressed with [gzip][rfc1952_2]. +## `+zstd` Media Types + +* The media type `application/vnd.oci.image.layer.v1.tar+zstd` represents an `application/vnd.oci.image.layer.v1.tar` payload which has been compressed with [zstd][rfc8478]. +* The media type `application/vnd.oci.image.layer.nondistributable.v1.tar+zstd` represents an `application/vnd.oci.image.layer.nondistributable.v1.tar` payload which has been compressed with [zstd][rfc8478]. + ## Distributable Format * Layer Changesets for the [media type](media-types.md) `application/vnd.oci.image.layer.v1.tar` MUST be packaged in [tar archive][tar-archive]. @@ -331,3 +336,4 @@ Implementations SHOULD NOT upload layers tagged with this media type; however, s [gnu-tar-standard]: http://www.gnu.org/software/tar/manual/html_node/Standard.html [rfc1952_2]: https://tools.ietf.org/html/rfc1952 [tar-archive]: https://en.wikipedia.org/wiki/Tar_(computing) +[rfc8478]: https://tools.ietf.org/html/rfc8478 diff --git a/media-types.md b/media-types.md index 1f01fd6..b9a0824 100644 --- a/media-types.md +++ b/media-types.md @@ -9,8 +9,10 @@ The following media types identify the formats described here and their referenc - `application/vnd.oci.image.config.v1+json`: [Image config](config.md) - `application/vnd.oci.image.layer.v1.tar`: ["Layer", as a tar archive](layer.md) - `application/vnd.oci.image.layer.v1.tar+gzip`: ["Layer", as a tar archive](layer.md#gzip-media-types) compressed with [gzip][rfc1952] +- `application/vnd.oci.image.layer.v1.tar+zstd`: ["Layer", as a tar archive](layer.md#zstd-media-types) compressed with [zstd][rfc8478] - `application/vnd.oci.image.layer.nondistributable.v1.tar`: ["Layer", as a tar archive with distribution restrictions](layer.md#non-distributable-layers) - `application/vnd.oci.image.layer.nondistributable.v1.tar+gzip`: ["Layer", as a tar archive with distribution restrictions](layer.md#gzip-media-types) compressed with [gzip][rfc1952] +- `application/vnd.oci.image.layer.nondistributable.v1.tar+zstd`: ["Layer", as a tar archive with distribution restrictions](layer.md#zstd-media-types) compressed with [zstd][rfc8478] ## Media Type Conflicts @@ -66,3 +68,4 @@ The following figure shows how the above media types reference each other: The image-index being a "fat manifest" references a list of image manifests per target platform. An image manifest references exactly one target configuration and possibly many layers. [rfc1952]: https://tools.ietf.org/html/rfc1952 +[rfc8478]: https://tools.ietf.org/html/rfc8478