Skip to content

Commit c3e3887

Browse files
riceaannevk
authored andcommitted
Add TextEncoderStream and TextDecoderStream transform streams
Integrate with the streams standard by adding TextEncoderStream and TextDecoderStream transform streams to the standard. These enable byte<>string conversions on a ReadableStream using the pipeThrough() method (see https://streams.spec.whatwg.org/#rs-pipe-through). A TextEncoderStream object can be used to transform a stream of strings to a stream of bytes in UTF-8 encoding. A TextDecoderStream object can be used to transform a stream of bytes in the encoding passed to the constructor to strings. Tests: web-platform-tests/wpt#12430. There is a prollyfill and tests for the new functionality at https://github.com/GoogleChromeLabs/text-encode-transform-prollyfill. Closes #72.
1 parent 6f9a41f commit c3e3887

File tree

1 file changed

+491
-64
lines changed

1 file changed

+491
-64
lines changed

0 commit comments

Comments
 (0)