<?xml version="1.0" encoding="UTF-8"?>
  <?xml-stylesheet type="text/xsl" href="rfc2629.xslt" ?>
  <!-- generated by https://github.com/cabo/kramdown-rfc version 1.7.29 (Ruby 3.4.9) -->


<!DOCTYPE rfc  [
  <!ENTITY nbsp    "&#160;">
  <!ENTITY zwsp   "&#8203;">
  <!ENTITY nbhy   "&#8209;">
  <!ENTITY wj     "&#8288;">

]>


<rfc ipr="trust200902" docName="draft-lcurley-moq-flate-00" category="info" submissionType="IETF" tocInclude="true" sortRefs="true" symRefs="true">
  <front>
    <title abbrev="moq-flate">DEFLATE Compressed Tracks for MoQ</title>

    <author fullname="Luke Curley">
      <organization></organization>
      <address>
        <email>kixelated@gmail.com</email>
      </address>
    </author>

    <date year="2026" month="September" day="24"/>

    <area>wit</area>
    <workgroup>moq</workgroup>
    

    <abstract>


<?line 27?>

<t>This document specifies how a MoQ Transport <xref target="moqt"/> track carries DEFLATE-compressed payloads.
Each subgroup is one raw DEFLATE stream, sync flushed at each object boundary, so every object stays self-delimited while later objects compress against the earlier ones in the subgroup.
Small repetitive payloads compress several times better than they do alone, and a dropped group costs nothing beyond itself because the window never spans one.
Nothing is added to the wire: the application declares the track compressed, and a relay forwards it unchanged.</t>



    </abstract>



  </front>

  <middle>


<?line 34?>

<section anchor="conventions-and-definitions"><name>Conventions and Definitions</name>
<t>The key words "<bcp14>MUST</bcp14>", "<bcp14>MUST NOT</bcp14>", "<bcp14>REQUIRED</bcp14>", "<bcp14>SHALL</bcp14>", "<bcp14>SHALL
NOT</bcp14>", "<bcp14>SHOULD</bcp14>", "<bcp14>SHOULD NOT</bcp14>", "<bcp14>RECOMMENDED</bcp14>", "<bcp14>NOT RECOMMENDED</bcp14>",
"<bcp14>MAY</bcp14>", and "<bcp14>OPTIONAL</bcp14>" in this document are to be interpreted as
described in BCP 14 <xref target="RFC2119"/> <xref target="RFC8174"/> when, and only when, they
appear in all capitals, as shown here.</t>

<?line -18?>

</section>
<section anchor="introduction"><name>Introduction</name>
<t>A live track is usually many small payloads rather than a few large ones.
DEFLATE <xref target="RFC1951"/> on one such payload alone is close to useless: the window starts cold, and below a few hundred bytes the block overhead can exceed the savings.
The redundancy worth exploiting is between payloads: a JSON snapshot followed by its deltas, a telemetry record repeated at 50 Hz, successive subtitle cues.</t>

<t>Compressing a whole track captures that redundancy but breaks on delivery.
Groups are dropped, arrive out of order, and a subscriber joins at an arbitrary point, so a window spanning data it never received cannot be reconstructed.
Scoping the window to a subgroup is the compromise: a drop costs nothing beyond itself, joining costs only the current group, and the transport never has to know.</t>

</section>
<section anchor="scope"><name>Compression Scope</name>
<t>Each subgroup is a separate DEFLATE stream: its object payloads share one window, in order, starting cold.
<xref target="moql"/> has no subgroups, so each group is one stream of frames.</t>

<t>The application decides which subgroups a track uses; a consumer knows which to expect and decodes each one's objects in order.</t>

<t>A publisher <bcp14>MUST NOT</bcp14> send a compressed track in datagrams, which are neither ordered nor reliable.</t>

<t>An object with no payload is skipped, neither advancing nor resetting the window.</t>

</section>
<section anchor="stream"><name>Compressed Stream</name>
<t>A subgroup's payloads are compressed, in order, into one raw DEFLATE stream <xref target="RFC1951"/>, with no zlib or gzip wrapper.
A publisher <bcp14>MUST</bcp14> sync flush after each payload, which ends the block and byte-aligns the output while retaining the window (<xref section="3.2.4" sectionFormat="comma" target="RFC1951"/>, <spanx style="verb">Z_SYNC_FLUSH</spanx> in zlib).
Each object carries the bytes that flush produced, with no length prefix.</t>

<t>A sync flush always ends with the marker <spanx style="verb">0x00 0x00 0xff 0xff</spanx>.
A publisher <bcp14>MUST</bcp14> omit it from each object and a consumer <bcp14>MUST</bcp14> append it before decompressing, the same trick as permessage-deflate (<xref section="7.2.1" sectionFormat="comma" target="RFC7692"/>).</t>

<t>A zero-length payload is neither compressed nor decompressed.</t>

<t>The stream is never terminated: no object ends in a final block, so a consumer decompresses incrementally and <bcp14>MUST NOT</bcp14> treat the absent end of stream as truncation.</t>

<t>A consumer missing an object <bcp14>MUST</bcp14> abandon the rest of the subgroup, which it can no longer decompress.
The compression level is a publisher's choice; any conformant stream decodes.</t>

</section>
<section anchor="declare"><name>Declaring Compression</name>
<t>The application declares a track compressed, conventionally with a <spanx style="verb">.z</spanx> suffix on the track name, or in its catalog.
A consumer <bcp14>MUST NOT</bcp14> infer compression from the payload: raw DEFLATE has no magic number, so a wrong guess yields plausible garbage.</t>

<t>There is deliberately no transport signal.
A relay drops objects and re-frames what it forwards, so a transport that knew about the window would make the relay responsible for emitting a stream that still decodes, which means carrying a DEFLATE implementation.
Instead a relay forwards opaque bytes, and an endpoint that has never heard of this document never asks for a compressed track.</t>

</section>
<section anchor="security-considerations"><name>Security Considerations</name>
<t>A shared window is a side channel.
The compressed size of one payload reveals how much it has in common with the payloads before it, enough to recover a secret an attacker can partially guess, as CRIME and BREACH demonstrated against TLS and HTTP compression.
A publisher <bcp14>MUST NOT</bcp14> compress a secret and attacker-influenced data in the same subgroup.
Encryption does not mitigate this, since the sizes are visible to anyone on the path.</t>

<t>A few bytes can inflate to gigabytes, so a consumer <bcp14>MUST</bcp14> bound the decompressed size of each object and abandon the subgroup once that bound is exceeded.
Each open subgroup also holds a window of up to 32 KiB, so a consumer <bcp14>SHOULD</bcp14> bound how many it decompresses at once.</t>

</section>
<section anchor="iana-considerations"><name>IANA Considerations</name>

<t>This document requests no registrations.
The format lives inside object payloads, which <xref target="moqt"/> treats as opaque.</t>

</section>


  </middle>

  <back>


<references title='References' anchor="sec-combined-references">

    <references title='Normative References' anchor="sec-normative-references">




<reference anchor="moqt">
   <front>
      <title>Media over QUIC Transport</title>
      <author fullname="Suhas Nandakumar" initials="S." surname="Nandakumar">
         <organization>Cisco</organization>
      </author>
      <author fullname="Victor Vasiliev" initials="V." surname="Vasiliev">
         <organization>Google</organization>
      </author>
      <author fullname="Ian Swett" initials="I." surname="Swett">
         <organization>Google</organization>
      </author>
      <author fullname="Alan Frindell" initials="A." surname="Frindell">
         <organization>Meta</organization>
      </author>
      <date day="8" month="September" year="2026"/>
      <abstract>
	 <t>   This document defines Media over QUIC Transport (MOQT), a publish/
   subscribe protocol that runs over QUIC and WebTransport.  MOQT
   leverages the features of these transports, such as streams,
   datagrams, priorities, and partial reliability.  MOQT operates both
   point-to-point and through intermediate relays, enabling scalable
   low-latency delivery.  Despite its name, MOQT is media agnostic and
   can be used for a wide range of use cases.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-ietf-moq-transport-21"/>
   
</reference>
<reference anchor="RFC1951">
  <front>
    <title>DEFLATE Compressed Data Format Specification version 1.3</title>
    <author fullname="P. Deutsch" initials="P." surname="Deutsch"/>
    <date month="May" year="1996"/>
    <abstract>
      <t>This specification defines a lossless compressed data format that compresses data using a combination of the LZ77 algorithm and Huffman coding, with efficiency comparable to the best currently available general-purpose compression methods. This memo provides information for the Internet community. This memo does not specify an Internet standard of any kind.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="1951"/>
  <seriesInfo name="DOI" value="10.17487/RFC1951"/>
</reference>
<reference anchor="RFC7692">
  <front>
    <title>Compression Extensions for WebSocket</title>
    <author fullname="T. Yoshino" initials="T." surname="Yoshino"/>
    <date month="December" year="2015"/>
    <abstract>
      <t>This document defines a framework for creating WebSocket extensions that add compression functionality to the WebSocket Protocol. An extension based on this framework compresses the payload data portion of WebSocket data messages on a per-message basis using parameters negotiated during the opening handshake. This framework provides a general method for applying a compression algorithm to the contents of WebSocket messages. Each compression algorithm has to be defined in a document defining the extension by specifying the parameter negotiation and the payload transformation algorithm in detail. This document also specifies one specific compression extension using the DEFLATE algorithm.</t>
    </abstract>
  </front>
  <seriesInfo name="RFC" value="7692"/>
  <seriesInfo name="DOI" value="10.17487/RFC7692"/>
</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 signify the requirements in the specification. These words are often capitalized. This document defines these words as they should be interpreted in IETF documents. This document specifies an Internet Best Current Practices for the Internet Community, 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</title>
    <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 only 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 title='Informative References' anchor="sec-informative-references">




<reference anchor="moql">
   <front>
      <title>Media over QUIC - Lite</title>
      <author fullname="Luke Curley" initials="L." surname="Curley">
         </author>
      <date day="30" month="June" year="2026"/>
      <abstract>
	 <t>   moq-lite is designed to fanout live content 1-&gt;N across the internet.
   It leverages QUIC to prioritize important content, avoiding head-of-
   line blocking while respecting encoding dependencies.  While
   primarily designed for media, the transport is payload agnostic and
   can be proxied by relays/CDNs without knowledge of codecs,
   containers, or encryption keys.

	 </t>
      </abstract>
   </front>
   <seriesInfo name="Internet-Draft" value="draft-lcurley-moq-lite-05"/>
   
</reference>



    </references>

</references>


<?line 120?>

<section numbered="false" anchor="acknowledgments"><name>Acknowledgments</name>

<t>This document was drafted with the assistance of Claude, an AI assistant by Anthropic.</t>

</section>


  </back>

<!-- ##markdown-source:
H4sIAAAAAAAAA31Y23IbuRF9n69A6IdkUyLLsr3xmtnshpbklRJdvJL84KRS
a3AGJLHCALMARjSl0r/kW/JlOd3ADIeSEj1Qc8Gl+/Tp040Zj8dF1NGoqRgd
Hn04nV0fiQNXN16FoCpx7WV5E8TCeXHmfh4Vcj736hZja/fbeGFkVKOixO/S
+c1UaLtwRVG50soa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