rfc9659.original.xml   rfc9659.xml 
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE rfc [ <!DOCTYPE rfc [
<!ENTITY nbsp "&#160;"> <!ENTITY nbsp "&#160;">
<!ENTITY zwsp "&#8203;"> <!ENTITY zwsp "&#8203;">
<!ENTITY nbhy "&#8209;"> <!ENTITY nbhy "&#8209;">
<!ENTITY wj "&#8288;"> <!ENTITY wj "&#8288;">
]> ]>
<?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
<!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.18 (Ruby 3.3. <rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft
3) --> -ietf-httpbis-zstd-window-size-03" number="9659" category="info" consensus="true
<rfc xmlns:xi="http://www.w3.org/2001/XInclude" ipr="trust200902" docName="draft " submissionType="IETF" updates="8878" tocInclude="true" sortRefs="true" symRefs
-ietf-httpbis-zstd-window-size-03" category="info" consensus="true" submissionTy ="true" version="3" xml:lang="en">
pe="IETF" updates="8878" tocInclude="true" sortRefs="true" symRefs="true" versio
n="3">
<!-- xml2rfc v2v3 conversion 3.22.0 -->
<front> <front>
<title abbrev="Zstd Window Size">Window Sizing for Zstandard Content Encodin <title abbrev="Window Size for zstd">Window Sizing for Zstandard Content Enc
g</title> oding</title>
<seriesInfo name="Internet-Draft" value="draft-ietf-httpbis-zstd-window-size <seriesInfo name="RFC" value="9659"/>
-03"/>
<author initials="N." surname="Jaju" fullname="Nidhi Jaju" role="editor"> <author initials="N." surname="Jaju" fullname="Nidhi Jaju" role="editor">
<organization>Google</organization> <organization>Google</organization>
<address> <address>
<postal> <postal>
<street>Shibuya Stream, 3 Chome-21-3 Shibuya</street> <street>Shibuya Stream, 3 Chome-21-3 Shibuya</street>
<region>Shibuya City, Tokyo</region> <region>Shibuya City, Tokyo</region>
<code>150-0002</code> <code>150-0002</code>
<country>Japan</country> <country>Japan</country>
</postal> </postal>
<email>nidhijaju@google.com</email> <email>nidhijaju@google.com</email>
</address> </address>
</author> </author>
<author initials="F." surname="Handte" fullname="W. Felix P. Handte" role="e
ditor"> <author initials="W. F." surname="Handte" fullname="W. Felix P. Handte" role
="editor">
<organization>Meta Platforms, Inc.</organization> <organization>Meta Platforms, Inc.</organization>
<address> <address>
<postal> <postal>
<street>380 W 33rd St</street> <street>380 W 33rd St</street>
<city>New York</city> <city>New York</city>
<region>NY</region> <region>NY</region>
<code>10001</code> <code>10001</code>
<country>US</country> <country>United States of America</country>
</postal> </postal>
<email>felixh@meta.com</email> <email>felixh@meta.com</email>
</address> </address>
</author> </author>
<date year="2024" month="August" day="23"/> <date year="2024" month="September"/>
<area>Web and Internet Transport</area> <area>WIT</area>
<workgroup>HTTPBIS</workgroup> <workgroup>httpbis</workgroup>
<keyword>zstd</keyword> <keyword>zstd</keyword>
<keyword>zstandard</keyword> <keyword>zstandard</keyword>
<keyword>compression</keyword> <keyword>compression</keyword>
<keyword>content encoding</keyword> <keyword>content encoding</keyword>
<keyword>content coding</keyword> <keyword>content coding</keyword>
<keyword>application/zstd</keyword> <keyword>application/zstd</keyword>
<abstract>
<?line 59?>
<t>Deployments of Zstandard, or "zstd", can use different window sizes to limit <abstract><t>Deployments of Zstandard, or "zstd", can use different window
memory usage during compression and decompression. Some browsers and user sizes to limit memory usage during compression and decompression. Some
agents limit window sizes to mitigate memory usage concerns, causing browsers and user agents limit window sizes to mitigate memory usage
interoperability issues. This document updates the window size limit in RFC8878 concerns, thereby causing interoperability issues. This document updates the
from a recommendation to a requirement in HTTP contexts.</t> window size limit in RFC 8878 from a recommendation to a requirement in
HTTP contexts.</t>
</abstract> </abstract>
<note removeInRFC="true">
<name>About This Document</name>
<t>
The latest revision of this draft can be found at <eref target="https://
httpwg.org/http-extensions/draft-ietf-httpbis-zstd-window-size.html"/>.
Status information for this document may be found at <eref target="https
://datatracker.ietf.org/doc/draft-ietf-httpbis-zstd-window-size/"/>.
</t>
<t>
Discussion of this document takes place on the
HTTP Working Group mailing list (<eref target="mailto:ietf-http-wg@w3.or
g"/>),
which is archived at <eref target="https://lists.w3.org/Archives/Public/
ietf-http-wg/"/>.
</t>
<t>Source for this draft and an issue tracker can be found at
<eref target="https://github.com/httpwg/http-extensions/labels/zstd-wind
ow-size"/>.</t>
</note>
</front> </front>
<middle> <middle>
<?line 68?>
<section anchor="introduction"> <section anchor="introduction">
<name>Introduction</name> <name>Introduction</name>
<t>Zstandard, or "zstd", specified in <xref target="RFC8878"/>, is a lossl ess data compression <t>Zstandard, or "zstd", specified in <xref target="RFC8878"/>, is a lossl ess data compression
mechanism similar to gzip. When used with HTTP, the "zstd" content coding mechanism similar to gzip. When used with HTTP, the "zstd" content coding
token signals to the decoder that the content is Zstandard-compressed.</t> token signals to the decoder that the content is Zstandard-compressed.</t>
<t>An important property of Zstandard-compressed content is its Window_Siz e <t>An important property of Zstandard-compressed content is its Window_Siz e
(<xref section="3.1.1.1.2" sectionFormat="comma" target="RFC8878"/>), which desc ribes the maximum distance for (<xref section="3.1.1.1.2" sectionFormat="comma" target="RFC8878"/>), which desc ribes the maximum distance for
back-references and therefore how much of the content must be kept in memory back-references and therefore how much of the content must be kept in memory
during decompression.</t> during decompression.</t>
<t>The minimum Window_Size is 1 KB. The maximum Window_Size is <t>The minimum Window_Size is 1 KB. The maximum Window_Size is
(1&lt;&lt;41) + 7*(1&lt;&lt;38) bytes, which is 3.75 TB. Larger Window_Size valu (1&lt;&lt;41) + 7*(1&lt;&lt;38) bytes, where "&lt;&lt;" denotes a bitwise left s
es tend hift, which is 3.75 TB. Larger Window_Size values tend
to improve the compression ratio, but at the cost of increased memory usage.</t> to improve the compression ratio but at the cost of increased memory usage.</t>
<t>To protect against unreasonable memory usage, some browsers and user ag ents <t>To protect against unreasonable memory usage, some browsers and user ag ents
limit the maximum Window_Size they will handle. This causes failures to decode limit the maximum Window_Size they will handle. This causes failures to decode
responses when the content is compressed with a larger Window_Size than the responses when the content is compressed with a larger Window_Size than the
recipient allows, leading to decreased interoperability.</t> recipient allows, leading to decreased interoperability.</t>
<t><xref section="3.1.1.1.2" sectionFormat="comma" target="RFC8878"/> reco mmends that decoders support a Window_Size <t><xref section="3.1.1.1.2" sectionFormat="comma" target="RFC8878"/> reco mmends that decoders support a Window_Size
of up to 8 MB, and that encoders not generate frames using a Window_Size larger of up to 8 MB, and that encoders not generate frames using a Window_Size larger
than 8 MB. However, it imposes no requirements.</t> than 8 MB. However, it imposes no requirements.</t>
<t>This document updates <xref target="RFC8878"/> to enforce Window_Size l imits on the encoder <t>This document updates <xref target="RFC8878"/> to enforce Window_Size l imits on the encoder
and decoder for the "zstd" HTTP content coding.</t> and decoder for the "zstd" HTTP content coding.</t>
</section> </section>
<section anchor="conventions-and-definitions"> <section anchor="conventions-and-definitions">
<name>Conventions and Definitions</name> <name>Conventions and Definitions</name>
<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14 <t>
>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>",
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECO "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL NOT</bcp14>
MMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>", ",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be i "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>",
nterpreted as "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and "<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to
only when, they be
appear in all capitals, as shown here.</t> interpreted as described in BCP&nbsp;14 <xref target="RFC2119"/> <xref
<?line -18?> target="RFC8174"/> when, and only when, they appear in all capitals, as
shown here.
</t>
</section> </section>
<section anchor="window-size"> <section anchor="window-size">
<name>Window Size</name> <name>Window Size</name>
<t>To ensure interoperability, when using the "zstd" content coding, decod ers <bcp14>MUST</bcp14> <t>To ensure interoperability, when using the "zstd" content coding, decod ers <bcp14>MUST</bcp14>
support a Window_Size of up to and including 8 MB, and encoders <bcp14>MUST NOT< /bcp14> support a Window_Size of up to and including 8 MB, and encoders <bcp14>MUST NOT< /bcp14>
generate frames requiring a Window_Size larger than 8 MB (see generate frames requiring a Window_Size larger than 8 MB (see
<xref target="zstd-iana-token"/>).</t> <xref target="zstd-iana-token"/>).</t>
</section> </section>
<section anchor="security-considerations"> <section anchor="security-considerations">
<name>Security Considerations</name> <name>Security Considerations</name>
<t>This document introduces no new security considerations beyond those di scussed <t>This document introduces no new security considerations beyond those di scussed
in <xref target="RFC8878"/>.</t> in <xref target="RFC8878"/>.</t>
<t>Note that decoders still need to take into account that they can receiv e <t>Note that decoders still need to take into account that they can receiv e
oversized frames that do not follow the window size limit specified in this oversized frames that do not follow the window size limit specified in this
document and fail decoding when such invalid frames are received.</t> document and fail decoding when such invalid frames are received.</t>
</section> </section>
<section anchor="iana-considerations"> <section anchor="iana-considerations">
<name>IANA Considerations</name> <name>IANA Considerations</name>
<section anchor="zstd-iana-token"> <section anchor="zstd-iana-token">
<name>Content Encoding</name> <name>Content Encoding</name>
<t>This document updates the entry added in <xref target="RFC8878"/> to <t>This document updates the following entry in the "HTTP Content
the <eref target="https://www.iana.org/assignments/http-parameters/http-paramete Coding Registry"
rs.xhtml#content-coding">"HTTP Content in the <eref target="https://www.iana.org/assignments/http-parameters">"Hypertex
Coding Registry"</eref> t Transfer Protocol (HTTP)
within the <eref target="https://www.iana.org/assignments/http-parameters/http-p Parameters" registry group</eref>:</t>
arameters.xhtml">"Hypertext Transfer Protocol (HTTP)
Parameters"</eref>
registry:</t>
<dl> <dl>
<dt>Name:</dt> <dt>Name:</dt>
<dd> <dd>
<t>zstd</t> <t>zstd</t>
</dd> </dd>
<dt>Description:</dt> <dt>Description:</dt>
<dd> <dd>
<t>A stream of bytes compressed using the Zstandard protocol with a Window_Size <t>A stream of bytes compressed using the Zstandard protocol with a Window_Size
of not more than 8 MB.</t> of not more than 8 MB.</t>
</dd> </dd>
skipping to change at line 153 skipping to change at line 141
<dd> <dd>
<t>This document and <xref target="RFC8878"/></t> <t>This document and <xref target="RFC8878"/></t>
</dd> </dd>
</dl> </dl>
</section> </section>
</section> </section>
</middle> </middle>
<back> <back>
<references anchor="sec-normative-references"> <references anchor="sec-normative-references">
<name>Normative References</name> <name>Normative References</name>
<reference anchor="RFC8878">
<front> <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.887
<title>Zstandard Compression and the 'application/zstd' Media Type</ti 8.xml"/>
tle> <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.211
<author fullname="Y. Collet" initials="Y." surname="Collet"/> 9.xml"/>
<author fullname="M. Kucherawy" initials="M." role="editor" surname="K <xi:include href="https://bib.ietf.org/public/rfc/bibxml/reference.RFC.817
ucherawy"/> 4.xml"/>
<date month="February" year="2021"/>
<abstract>
<t>Zstandard, or "zstd" (pronounced "zee standard"), is a lossless d
ata compression mechanism. This document describes the mechanism and registers a
media type, content encoding, and a structured syntax suffix to be used when tr
ansporting zstd-compressed content via MIME.</t>
<t>Despite use of the word "standard" as part of Zstandard, readers
are advised that this document is not an Internet Standards Track specification;
it is being published for informational purposes only.</t>
<t>This document replaces and obsoletes RFC 8478.</t>
</abstract>
</front>
<seriesInfo name="RFC" value="8878"/>
<seriesInfo name="DOI" value="10.17487/RFC8878"/>
</reference>
<reference anchor="RFC2119">
<front>
<title>Key words for use in RFCs to Indicate Requirement Levels</title
>
<author fullname="S. Bradner" initials="S." surname="Bradner"/>
<date month="March" year="1997"/>
<abstract>
<t>In many standards track documents several words are used to signi
fy the requirements in the specification. These words are often capitalized. Thi
s document defines these words as they should be interpreted in IETF documents.
This document specifies an Internet Best Current Practices for the Internet Comm
unity, and requests discussion and suggestions for improvements.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="2119"/>
<seriesInfo name="DOI" value="10.17487/RFC2119"/>
</reference>
<reference anchor="RFC8174">
<front>
<title>Ambiguity of Uppercase vs Lowercase in RFC 2119 Key Words</titl
e>
<author fullname="B. Leiba" initials="B." surname="Leiba"/>
<date month="May" year="2017"/>
<abstract>
<t>RFC 2119 specifies common key words that may be used in protocol
specifications. This document aims to reduce the ambiguity by clarifying that on
ly UPPERCASE usage of the key words have the defined special meanings.</t>
</abstract>
</front>
<seriesInfo name="BCP" value="14"/>
<seriesInfo name="RFC" value="8174"/>
<seriesInfo name="DOI" value="10.17487/RFC8174"/>
</reference>
</references> </references>
<?line 160?>
<section numbered="false" anchor="acknowledgments"> <section numbered="false" anchor="acknowledgments">
<name>Acknowledgments</name> <name>Acknowledgments</name>
<t>Zstandard was developed by Yann Collet.</t> <t>Zstandard was developed by <contact fullname="Yann Collet" />.</t>
<t>The authors would like to thank Yann Collet, Klaus Post, Adam Rice, and <t>The authors would like to thank <contact fullname="Yann Collet" />, <co
members ntact fullname="Klaus Post" />, <contact fullname="Adam Rice" />, and members
of the Web Performance Working Group in the W3C for collaborating on the window of the Web Performance Working Group in the W3C for collaborating on the window
size issue and helping to formulate a solution. Also, thank you to Nick Terrell size issue and helping to formulate a solution.</t>
for providing feedback that went into RFC 8478 and RFC 8878.</t>
</section> </section>
</back> </back>
<!-- ##markdown-source:
H4sIAAAAAAAAA61Y3XLbNha+x1OclW/irihbUTrxarJNFSdp3MaO13LGk+10
diASklCRBAuAVhRP3mWfZZ9svwNQEmk7073Y8YXFQ+D8fufDAZMkEV77XI3p
RpeZWdNUf9HlgubG0j+dl2UmbUanpvSq9PSmTE2G10LOZlbdjnlJ1tqpRCq9
Whi7GZMu50aIzKSlLKA+s3LuE638PFl6X820S75gc7IOmxOHzcnxSLh6Vmjn
NAxuKmw7e3P9VpR1MVN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G8XY3WWzC4AmyVBhdBQ4vy3NZts1MVGoC
+80NU/Q3RrjOKMVNKfZNiRD4GInOcZZD8R2f/LrEEap35rh/G1+ykNKzycXk
QToPDh5c7unu4H5RvkWpkSUx4JPMsu3o12FZXvFrL9BkY0ecRitXuDlgqt/0
fnuyvU2u1+sBWw33Sel4kAuUHu+WleTAAP4Hz4PPfJE8aBCfxDAOBZ+Zuty6
sOEpDvNt/AqAMYouMRSY1OT0hP07FJc7hf83nw6FbcLEVeaCb2tCxMstX2WY
R6twG2PpJNy8ZMFdGAan9vm/b+/9V5lq638zHLTPYGItjLSCp8P9CSrE1XaE
DEa7dWV4tQrYXAR48mQATdJVada5yhYhA+JuHD/MqOzvvTmYW/W+tm4HtAaP
Zzitc5BVhojokyxLoCDPlW9mzXinx/Bj6jwD+lcqYkaWq/bqPv2SY4SiS0x6
fZpkyNGVTlWkJExv8MGJZvDljz6XyoYrJI/OnU8q1MDhZnQaTnIkL5czw92A
Jc2xHxtSuDjX4gYWzCxVXjWzFOuu+VMIcu5MXvtwM5zkzvQb3zem5oUXOl3R
tbJW5blgezzS6oD+OdiE8xpZYd1wmeG7G508e34SbIYHVALZ+i+pzXbpqRMA
AA==
</rfc> </rfc>
 End of changes. 18 change blocks. 
183 lines changed or deleted 57 lines changed or added

This html diff was produced by rfcdiff 1.48.