RFC 9842, “Compression Dictionary Transport”, lets an HTTP response serve as the dictionary for
later responses. Two content codings use a dictionary: dcb, Dictionary-Compressed
Brotli, and dcz, Dictionary-Compressed Zstandard. A saved dcb or
dcz body is a file with a fixed header. Source: RFC 9842
(rfc-editor.org/rfc/rfc9842.txt), read in November 2026.
DCB: Dictionary-Compressed Brotli
A fixed 36-byte header followed by a Shared Brotli stream (RFC 9841) made with the referenced external dictionary and a compression window of at most 16 MB (section 4).
| Offset | Size | Name | Meaning |
|---|---|---|---|
| 0 | 4 | Magic_Number | FF 44 43 42 (0xff then “DCB”) |
| 4 | 32 | SHA_256_Hash | The SHA-256 digest of the dictionary used |
| 36 | rest | Stream | A shared brotli stream. The dictionary is a raw one, used as a prefix dictionary (a dictionary set in front of the sliding window, RFC 9841 section 8.2); the whole dictionary is available throughout, independent of the window, so a resource larger than the window can still be delta-compressed. |
A client that announces dcb must decompress windows up to 16 MB.
DCZ: Dictionary-Compressed Zstandard
A fixed 40-byte header followed by a Zstandard stream compressed with the external dictionary (section 5).
| Offset | Size | Name | Meaning |
|---|---|---|---|
| 0 | 8 | Magic_Number | 5E 2A 4D 18 20 00 00 00 |
| 8 | 32 | SHA_256_Hash | The SHA-256 digest of the dictionary used |
| 40 | rest | Stream | A Zstandard stream. The dictionary is a raw one, treated as a raw dictionary under section 5 of the Zstandard RFC. |
The 40-byte header is a Zstandard skippable frame: the magic number is little-endian
0x184D2A5E and the frame length little-endian 0x00000020 (32, the
hash). Existing Zstandard decoders therefore skip it. A client that announces dcz
must decompress windows of at least 8 MB or 1.25 times the dictionary size, whichever is
larger, up to 128 MB; the window size is coded in the content (a power of two), and a larger
one may be treated as a decoding error. With Zstandard the dictionary is available only until
the input exceeds the window.
Because the header is an ordinary skippable frame with a 32-byte payload, any Zstandard file that starts with a 32-byte frame of that magic looks the same; only the use tells them apart.
Decoding needs the dictionary
Neither file contains the dictionary: only its hash. To decompress, the reader must have the dictionary whose SHA-256 digest is that hash (and the RFC says the hash must be checked before use, section 2.1.3). Without it a file can be recognised and its header read, and the data decoded only as far as it does not refer into the dictionary. The two codings have their own pages and viewers: .DCB and .DCZ, where the explorer finds the dictionary among the files opened with the file, by its SHA-256.
Negotiation over HTTP
| Header | Direction | Type and meaning |
|---|---|---|
Use-As-Dictionary (2.1) | response | A Structured Field Dictionary that makes the response a dictionary. match: a URL Pattern String, required, no regular expressions, same origin as the dictionary, matched against the percent-encoded path. match-dest: an Inner List of Fetch request destinations, default empty (matches all). id: a String of up to 1024 characters, default empty, opaque to the client. type: a Token, default raw, the only format the RFC defines (an unknown type must not be used). |
Available-Dictionary (2.2) | request | A Structured Field Byte Sequence: the SHA-256 hash of one dictionary, for example :pZGm1Av0IEBKARczz7exkNYsZb8LzaMrV7J32a2fFG4=:. One header with one hash, for the best match. The dictionary must be fresh or allowed to be served stale. |
Dictionary-ID (2.3) | request | A String of up to 1024 characters, identical to the id that was stored with the dictionary, sent whenever that id was non-empty. |
Link: …; rel="compression-dictionary" (3) | response | A link relation naming a resource a client may fetch, which should then be served with Use-As-Dictionary. |
Accept-Encoding (6.1) | request | Adds dcb and/or dcz only when a matching dictionary is stored and used, for example gzip, deflate, br, zstd, dcb, dcz. |
Content-Encoding (6.2) | response | dcb or dcz. A cacheable response must carry Vary: accept-encoding, available-dictionary. |
Choosing among several matching dictionaries (2.2.3): a dictionary whose match-dest
matches the request’s destination beats one without; then the longest match; then
the most recently fetched. Dictionary transport is for secure contexts (HTTPS) only
(section 8). Both content-coding names are registered with IANA, as are the three header
names and the link relation (section 7).