| Internet-Draft | zstdict | October 2026 |
| Lindqvist | Expires 23 April 2027 | [Page] |
This document defines a new HTTP content coding, "zstdict", which enables Zstandard compression with a pre-shared dictionary. The dictionary is identified by a SHA-256 hash and negotiated via the Content-Dict response header.¶
This Internet-Draft is submitted in full conformance with the provisions of BCP 78 and BCP 79.¶
Internet-Drafts are working documents of the Internet Engineering Task Force (IETF). Note that other groups may also distribute working documents as Internet-Drafts. The list of current Internet-Drafts is at https://datatracker.ietf.org/drafts/current/.¶
Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress."¶
This Internet-Draft will expire on 23 April 2027.¶
Copyright (c) 2026 IETF Trust and the persons identified as the document authors. All rights reserved.¶
This document is subject to BCP 78 and the IETF Trust's Legal Provisions Relating to IETF Documents (https://trustee.ietf.org/license-info) in effect on the date of publication of this document. Please review these documents carefully, as they describe your rights and restrictions with respect to this document. Code Components extracted from this document must include Revised BSD License text as described in Section 4.e of the Trust Legal Provisions and are provided without warranty as described in the Revised BSD License.¶
Zstandard [RFC8878] is a compression algorithm that supports dictionaries for improved compression of small payloads. This document defines a new HTTP content coding, "zstdict", to signal Zstandard compression with a pre-shared dictionary.¶
The dictionary is identified by its SHA-256 hash. Clients MUST verify the hash before decoding.¶
The "zstdict" content coding is identical to "zstd" [RFC8878], except that a dictionary is used for both compression and decompression.¶
A response using "zstdict" MUST include a Content-Dict header containing the SHA-256 hash of the dictionary, in lowercase hex.¶
Example:¶
Content-Encoding: zstdict Content-Dict: sha256-89ff6702e9d396f01bdf8865451521d2ba23efce9c5968c784b85744d6e55faf¶
The Content-Dict header identifies the dictionary used for compression. Its value is a hash algorithm identifier followed by the hex-encoded hash.¶
Content-Dict = "sha256-" 64HEXDIG¶
The dictionary MUST be available to the client before decoding. Three distribution mechanisms are defined:¶
Servers MAY publish dictionaries at:¶
/.well-known/zstdict/<hash>¶
where <hash> is the SHA-256 hash from Content-Dict. Clients MAY fetch this URI on first encounter and cache it.¶
Clients MAY ship dictionaries with the application. In this case, the Content-Dict header is informational and the client uses the bundled dictionary matching the hash.¶
A reference dictionary and C library implementation for this specification are available at:¶
https://github.com/pngz-dev/zstdict.git¶
Dictionary deserialization is a known attack vector. Clients MUST validate the dictionary hash before use. Malicious dictionaries can cause denial of service. Implementations MUST limit the maximum size of accepted dictionaries.¶
This document registers "zstdict" in the HTTP Content Coding Registry.¶