@@ -66,7 +66,7 @@ A <dfn>compression context</dfn> is the internal state maintained by a compressi
6666
6767# Supported formats # {#supported-formats}
6868
69- : ` deflate`
69+ : {{CompressionFormat/ deflate}}
7070:: "ZLIB Compressed Data Format" [[!RFC1950]]
7171
7272 Note: This format is referred to as "deflate" for consistency with HTTP Content-Encodings. See [[RFC7230 obsolete]] section 4.2.2.
@@ -79,14 +79,14 @@ A <dfn>compression context</dfn> is the internal state maintained by a compressi
7979 * It is an error for DecompressionStream if the `ADLER32` checksum is not correct.
8080 * It is an error if there is additional input data after the `ADLER32` checksum.
8181
82- : ` deflate-raw`
82+ : {{CompressionFormat/ deflate-raw}}
8383:: "The DEFLATE algorithm" [[!RFC1951]]
8484
8585 * Implementations must be "compliant" as described in [[!RFC1951]] section 1.4.
8686 * Non-[[!RFC1951]] -conforming blocks must not be created by CompressionStream, and are errors for DecompressionStream.
8787 * It is an error if there is additional input data after the final block indicated by the `BFINAL` flag.
8888
89- : ` gzip`
89+ : {{CompressionFormat/ gzip}}
9090:: "GZIP file format" [[!RFC1952]]
9191
9292 * Implementations must be "compliant" as described in [[!RFC1952]] section 2.3.1.2.
@@ -103,9 +103,15 @@ A <dfn>compression context</dfn> is the internal state maintained by a compressi
103103# Interface `CompressionStream` # {#compression-stream}
104104
105105<pre class="idl">
106+ enum CompressionFormat {
107+ "deflate",
108+ "deflate-raw",
109+ "gzip",
110+ };
111+
106112[Exposed=*]
107113interface CompressionStream {
108- constructor(DOMString format);
114+ constructor(CompressionFormat format);
109115};
110116CompressionStream includes GenericTransformStream;
111117</pre>
@@ -140,7 +146,7 @@ The <dfn>compress flush and enqueue</dfn> algorithm, which handles the end of da
140146<pre class="idl">
141147[Exposed=*]
142148interface DecompressionStream {
143- constructor(DOMString format);
149+ constructor(CompressionFormat format);
144150};
145151DecompressionStream includes GenericTransformStream;
146152</pre>
0 commit comments