diff --git a/index.bs b/index.bs index 8262b66..911c041 100644 --- a/index.bs +++ b/index.bs @@ -92,26 +92,6 @@ A compression context is the internal state maintained by a compressi * A `gzip` stream may only contain one "member". * It is an error if there is additional input data after the end of the "member". -# Interface Mixin `GenericTransformStream` # {#generic-transform-stream} - -The {{GenericTransformStream}} interface mixin represents the concept of a transform stream in IDL. It is not a TransformStream, though it has the same interface and it delegates to one. - -
-interface mixin GenericTransformStream { - readonly attribute ReadableStream readable; - readonly attribute WritableStream writable; -}; -- -An object that includes {{GenericTransformStream}} has an associated transform of type TransformStream. - -## Attributes ## {#outgoing-stream-attributes} - -: readable -:: The `readable` attribute's getter, when invoked, must return this object's transform \[[readable]]. -: writable -:: The `writable` attribute's getter, when invoked, must return this object's transform \[[writable]]. - # Interface `CompressionStream` # {#compression-stream}
@@ -124,33 +104,26 @@ CompressionStream includes GenericTransformStream; A {{CompressionStream}} has an associated format and compression context context. -The {{CompressionStream}}(*format*) constructor, when invoked, must run these steps: - 1. If *format* is unsupported in CompressionStream, then throw a TypeError. - 1. Let *cs* be a new CompressionStream object. - 1. Set *cs*'s format to *format*. - 1. Let *startAlgorithm* be an algorithm that takes no arguments and returns nothing. - 1. Let *transformAlgorithm* be an algorithm which takes a *chunk* argument and runs the compress and enqueue a chunk algorithm with *cs* and *chunk*. - 1. Let *flushAlgorithm* be an algorithm which takes no argument and runs the compress flush and enqueue algorithm with *cs*. - 1. Let *transform* be the result of calling CreateTransformStream(*startAlgorithm*, *transformAlgorithm*, *flushAlgorithm*). - 1. Set *cs*'s transform to *transform*. - 1. Return *cs*. - -The compress and enqueue a chunk algorithm, given a CompressionStream object *cs* and a *chunk*, runs these steps: - 1. If *chunk* is not a {{BufferSource}} type, then return a promise rejected with a TypeError. +Thenew CompressionStream(|format|)
steps are: + 1. If *format* is unsupported in {{CompressionStream}}, then throw a {{TypeError}}. + 1. Set [=this=]'s format to *format*. + 1. Let *transformAlgorithm* be an algorithm which takes a *chunk* argument and runs the compress and enqueue a chunk algorithm with [=this=] and *chunk*. + 1. Let *flushAlgorithm* be an algorithm which takes no argument and runs the compress flush and enqueue algorithm with [=this=]. + 1. Set [=this=]'s [=GenericCompressionStream/transform=] to the result of [=TransformStream/creating=] a {{TransformStream}} with transformAlgorithm set to *transformAlgorithm* and flushAlgorithm set to *flushAlgorithm*. + +The compress and enqueue a chunk algorithm, given a {{CompressionStream}} object *cs* and a *chunk*, runs these steps: + 1. If *chunk* is not a {{BufferSource}} type, then throw a {{TypeError}}. 1. Let *buffer* be the result of compressing *chunk* with *cs*'s format and context. - 1. Let *controller* be *cs*'s transform.\[[TransformStreamController]]. - 1. If *buffer* is empty, return a promise resolved with undefined. - 1. Split *buffer* into one or more non-empty pieces and convert them into Uint8Arrays. - 1. For each Uint8Array *array*, call TransformStreamDefaultControllerEnqueue(*controller*, *array*). - 1. Return a promise resolved with undefined. + 1. If *buffer* is empty, return. + 1. Split *buffer* into one or more non-empty pieces and convert them into {{Uint8Array}}s. + 1. For each {{Uint8Array}} *array*, [=TransformStream/enqueue=] *array* in *cs*'s [=GenericTransformStream/transform=]. -The compress flush and enqueue algorithm, which handles the end of data from the input ReadableStream object, given a CompressionStream object *cs*, runs these steps: +The compress flush and enqueue algorithm, which handles the end of data from the input {{ReadableStream}} object, given a {{CompressionStream}} object *cs*, runs these steps: 1. Let *buffer* be the result of compressing an empty input with *cs*'s format and context, with the finish flag. - 1. If *buffer* is empty, return a promise resolved with undefined. - 1. Split *buffer* into one or more non-empty pieces and convert them into Uint8Arrays. - 1. For each Uint8Array *array*, call TransformStreamDefaultControllerEnqueue(*controller*, *array*). - 1. Return a promise resolved with undefined. + 1. If *buffer* is empty, return. + 1. Split *buffer* into one or more non-empty pieces and convert them into {{Uint8Array}}s. + 1. For each {{Uint8Array}} *array*, [=TransformStream/enqueue=] *array* in *cs*'s [=GenericTransformStream/transform=]. # Interface `DecompressionStream` # {#decompression-stream} @@ -165,34 +138,27 @@ DecompressionStream includes GenericTransformStream; A {{DecompressionStream}} has an associated format and compression context context. -The {{DecompressionStream}}(*format*) constructor, when invoked, must run these steps: - 1. If *format* is unsupported in DecompressionStream, then throw a TypeError. - 1. Let *ds* be a new DecompressionStream object. - 1. Set *ds*'s format to *format*. - 1. Let *startAlgorithm* be an algorithm that takes no arguments and returns nothing. +Thenew DecompressionStream(|format|)
steps are: + 1. If *format* is unsupported in {{DecompressionStream}}, then throw a {{TypeError}}. + 1. Set [=this=]'s format to *format*. 1. Let *transformAlgorithm* be an algorithm which takes a *chunk* argument and runs the decompress and enqueue a chunk algorithm with *ds* and *chunk*. 1. Let *flushAlgorithm* be an algorithm which takes no argument and runs the decompress flush and enqueue algorithm with *ds*. - 1. Let *transform* be the result of calling CreateTransformStream(*startAlgorithm*, *transformAlgorithm*, *flushAlgorithm*). - 1. Set *ds*'s transform to *transform*. - 1. Return *ds*. + 1. Set [=this=]'s [=GenericCompressionStream/transform=] to the result of [=TransformStream/creating=] a {{TransformStream}} with transformAlgorithm set to *transformAlgorithm* and flushAlgorithm set to *flushAlgorithm*. -The decompress and enqueue a chunk algorithm, given a DecompressionStream object *ds* and a *chunk*, runs these steps: - 1. If *chunk* is not a {{BufferSource}} type, then return a promise rejected with a TypeError. - 1. Let *buffer* be the result of decompressing *chunk* with *ds*'s format and context. If this results in an error, then return a promise rejected with a TypeError. - 1. Let *controller* be *ds*'s transform.\[[TransformStreamController]]. - 1. If *buffer* is empty, return a promise resolved with undefined. - 1. Split *buffer* into one or more non-empty pieces and convert them into Uint8Arrays. - 1. For each Uint8Array *array*, call TransformStreamDefaultControllerEnqueue(*controller*, *array*). - 1. Return a promise resolved with undefined. +The decompress and enqueue a chunk algorithm, given a {{DecompressionStream}} object *ds* and a *chunk*, runs these steps: + 1. If *chunk* is not a {{BufferSource}} type, then throw a {{TypeError}}. + 1. Let *buffer* be the result of decompressing *chunk* with *ds*'s format and context. If this results in an error, then throw a {{TypeError}}. + 1. If *buffer* is empty, return. + 1. Split *buffer* into one or more non-empty pieces and convert them into {{Uint8Array}}s. + 1. For each {{Uint8Array}} *array*, [=TransformStream/enqueue=] *array* in *ds*'s [=GenericTransformStream/transform=]. -The decompress flush and enqueue algorithm, which handles the end of data from the input ReadableStream object, given a DecompressionStream object *ds*, runs these steps: +The decompress flush and enqueue algorithm, which handles the end of data from the input {{ReadableStream}} object, given a {{DecompressionStream}} object *ds*, runs these steps: 1. Let *buffer* be the result of decompressing an empty input with *ds*'s format and context, with the finish flag. - 1. If the end of the compressed input has not been reached, return a promise rejected with a TypeError. - 1. If *buffer* is empty, return a promise resolved with undefined. - 1. Split *buffer* into one or more non-empty pieces and convert them into Uint8Arrays. - 1. For each Uint8Array *array*, call TransformStreamDefaultControllerEnqueue(*controller*, *array*). - 1. Return a promise resolved with undefined. + 1. If the end of the compressed input has not been reached, then throw a {{TypeError}}. + 1. If *buffer* is empty, return. + 1. Split *buffer* into one or more non-empty pieces and convert them into {{Uint8Array}}s. + 1. For each {{Uint8Array}} *array*, [=TransformStream/enqueue=] *array* in *ds*'s [=GenericTransformStream/transform=]. # Privacy and Security Considerations # {#privacy-security} diff --git a/index.html b/index.html index 5f18801..dd66f5d 100644 --- a/index.html +++ b/index.html @@ -1175,7 +1175,7 @@ 1. When table < content column, centers table in column. 2. When content < table < available, left-aligns. 3. When table > available, fills available + scroll bar. - */ + */ display: grid; grid-template-columns: minmax(0, 50em); } @@ -1222,93 +1222,8 @@ } - + - - - + + +