You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: index.bs
+8-8
Original file line number
Diff line number
Diff line change
@@ -94,16 +94,16 @@ The <dfn>compress and enqueue a chunk</dfn> algorithm, given a {{CompressionStre
94
94
1. If |chunk| is not a {{BufferSource}} type, then throw a {{TypeError}}.
95
95
1. Let |buffer| be the result of compressing |chunk| with |cs|'s <a for=CompressionStream>format</a> and <a for=CompressionStream>context</a>.
96
96
1. If |buffer| is empty, return.
97
-
1. Split |buffer| into one or more non-empty pieces and convert them into {{Uint8Array}}s.
98
-
1. For each {{Uint8Array}} |array|, [=TransformStream/enqueue=] |array| in |cs|'s [=GenericTransformStream/transform=].
97
+
1. Let |arrays| be the result of splitting |buffer| into one or more non-empty pieces and converting them into {{Uint8Array}}s.
98
+
1. [=list/For each=]{{Uint8Array}} |array| of |arrays|, [=TransformStream/enqueue=] |array| in |cs|'s [=GenericTransformStream/transform=].
99
99
</div>
100
100
101
101
<div algorithm>
102
102
The <dfn>compress flush and enqueue</dfn> algorithm, which handles the end of data from the input {{ReadableStream}} object, given a {{CompressionStream}} object |cs|, runs these steps:
103
103
1. Let |buffer| be the result of compressing an empty input with |cs|'s <a for=CompressionStream>format</a> and <a for=CompressionStream>context</a>, with the finish flag.
104
104
1. If |buffer| is empty, return.
105
-
1. Split |buffer| into one or more non-empty pieces and convert them into {{Uint8Array}}s.
106
-
1. For each {{Uint8Array}} |array|, [=TransformStream/enqueue=] |array| in |cs|'s [=GenericTransformStream/transform=].
105
+
1. Let |arrays| be the result of splitting |buffer| into one or more non-empty pieces and converting them into {{Uint8Array}}s.
106
+
1. [=list/For each=]{{Uint8Array}} |array| of |arrays|, [=TransformStream/enqueue=] |array| in |cs|'s [=GenericTransformStream/transform=].
107
107
</div>
108
108
109
109
@@ -134,17 +134,17 @@ The <dfn>decompress and enqueue a chunk</dfn> algorithm, given a {{Decompression
134
134
1. If |chunk| is not a {{BufferSource}} type, then throw a {{TypeError}}.
135
135
1. Let |buffer| be the result of decompressing |chunk| with |ds|'s <a for=DecompressionStream>format</a> and <a for=DecompressionStream>context</a>. If this results in an error, then throw a {{TypeError}}.
136
136
1. If |buffer| is empty, return.
137
-
1. Split |buffer| into one or more non-empty pieces and convert them into {{Uint8Array}}s.
138
-
1. For each {{Uint8Array}} |array|, [=TransformStream/enqueue=] |array| in |ds|'s [=GenericTransformStream/transform=].
137
+
1. Let |arrays| be the result of splitting |buffer| into one or more non-empty pieces and converting them into {{Uint8Array}}s.
138
+
1. [=list/For each=]{{Uint8Array}} |array| of |arrays|, [=TransformStream/enqueue=] |array| in |ds|'s [=GenericTransformStream/transform=].
139
139
</div>
140
140
141
141
<div algorithm>
142
142
The <dfn>decompress flush and enqueue</dfn> algorithm, which handles the end of data from the input {{ReadableStream}} object, given a {{DecompressionStream}} object |ds|, runs these steps:
143
143
1. Let |buffer| be the result of decompressing an empty input with |ds|'s <a for=DecompressionStream>format</a> and <a for=DecompressionStream>context</a>, with the finish flag.
144
144
1. If the end of the compressed input has not been reached, then throw a {{TypeError}}.
145
145
1. If |buffer| is empty, return.
146
-
1. Split |buffer| into one or more non-empty pieces and convert them into {{Uint8Array}}s.
147
-
1. For each {{Uint8Array}} |array|, [=TransformStream/enqueue=] |array| in |ds|'s [=GenericTransformStream/transform=].
146
+
1. Let |arrays| be the result of splitting |buffer| into one or more non-empty pieces and converting them into {{Uint8Array}}s.
147
+
1. [=list/For each=]{{Uint8Array}} |array| of |arrays|, [=TransformStream/enqueue=] |array| in |ds|'s [=GenericTransformStream/transform=].
0 commit comments