HTTP P. Lindqvist Internet-Draft Independent Intended status: Informational 20 October 2026 Expires: 23 April 2027 Zstandard Dictionary Content-Encoding draft-lindqvist-zstdict-01 Abstract 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. Status of This Memo 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 Notice 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. Lindqvist Expires 23 April 2027 [Page 1] Internet-Draft zstdict October 2026 Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . 2 2. The "zstdict" Content Coding . . . . . . . . . . . . . . . . 2 3. The Content-Dict Header . . . . . . . . . . . . . . . . . . . 2 4. Dictionary Distribution . . . . . . . . . . . . . . . . . . . 3 4.1. Well-Known URI . . . . . . . . . . . . . . . . . . . . . 3 4.2. Application-Bundled . . . . . . . . . . . . . . . . . . . 3 4.3. Reference Implementation . . . . . . . . . . . . . . . . 3 5. Security Considerations . . . . . . . . . . . . . . . . . . . 3 6. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 3 7. Normative References . . . . . . . . . . . . . . . . . . . . 3 Author's Address . . . . . . . . . . . . . . . . . . . . . . . . 4 1. Introduction 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. 2. The "zstdict" Content Coding 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 3. The Content-Dict Header 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 Lindqvist Expires 23 April 2027 [Page 2] Internet-Draft zstdict October 2026 4. Dictionary Distribution The dictionary MUST be available to the client before decoding. Three distribution mechanisms are defined: 4.1. Well-Known URI Servers MAY publish dictionaries at: /.well-known/zstdict/ where is the SHA-256 hash from Content-Dict. Clients MAY fetch this URI on first encounter and cache it. 4.2. Application-Bundled 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. 4.3. Reference Implementation A reference dictionary and C library implementation for this specification are available at: https://github.com/pngz-dev/zstdict.git 5. Security Considerations 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. 6. IANA Considerations This document registers "zstdict" in the HTTP Content Coding Registry. Name: zstdict Description: Zstandard compression with pre-shared dictionary Reference: this document 7. Normative References Lindqvist Expires 23 April 2027 [Page 3] Internet-Draft zstdict October 2026 [RFC8878] Collet, Y. and M. Kucherawy, "Zstandard Compression and the 'application/zstd' Media Type", RFC 8878, February 2021, . Author's Address Peter Lindqvist Independent Stockholm Sweden Email: bruhbruhbruh893@gmail.com Lindqvist Expires 23 April 2027 [Page 4]