@@ -66,7 +66,7 @@ A <dfn>compression context</dfn> is the internal state maintained by a compressi
66
66
67
67
# Supported formats # {#supported-formats}
68
68
69
- : ` deflate`
69
+ : {{CompressionFormat/ deflate}}
70
70
:: "ZLIB Compressed Data Format" [[!RFC1950]]
71
71
72
72
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
79
79
* It is an error for DecompressionStream if the `ADLER32` checksum is not correct.
80
80
* It is an error if there is additional input data after the `ADLER32` checksum.
81
81
82
- : ` deflate-raw`
82
+ : {{CompressionFormat/ deflate-raw}}
83
83
:: "The DEFLATE algorithm" [[!RFC1951]]
84
84
85
85
* Implementations must be "compliant" as described in [[!RFC1951]] section 1.4.
86
86
* Non-[[!RFC1951]] -conforming blocks must not be created by CompressionStream, and are errors for DecompressionStream.
87
87
* It is an error if there is additional input data after the final block indicated by the `BFINAL` flag.
88
88
89
- : ` gzip`
89
+ : {{CompressionFormat/ gzip}}
90
90
:: "GZIP file format" [[!RFC1952]]
91
91
92
92
* 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
103
103
# Interface `CompressionStream` # {#compression-stream}
104
104
105
105
<pre class="idl">
106
+ enum CompressionFormat {
107
+ "deflate",
108
+ "deflate-raw",
109
+ "gzip",
110
+ };
111
+
106
112
[Exposed=*]
107
113
interface CompressionStream {
108
- constructor(DOMString format);
114
+ constructor(CompressionFormat format);
109
115
};
110
116
CompressionStream includes GenericTransformStream;
111
117
</pre>
@@ -140,7 +146,7 @@ The <dfn>compress flush and enqueue</dfn> algorithm, which handles the end of da
140
146
<pre class="idl">
141
147
[Exposed=*]
142
148
interface DecompressionStream {
143
- constructor(DOMString format);
149
+ constructor(CompressionFormat format);
144
150
};
145
151
DecompressionStream includes GenericTransformStream;
146
152
</pre>
0 commit comments