Text encoding and decoding will support streams to enable you to easily convert streams of binary data to text and vice-versa. An example of its usefulness is with readable streams. With a non-stream Response object, response.Body.text() returns text. There is no equivalent for the ReadableStream returned by Response.Body, which can only return bytes. With the new API a streaming response body may be converted to text as so: Response.Body.pipeThrough(new TextDecoderStream()).

Documentation

Specification

Specification link


Specification currently under development in a Working Group

Status in Chromium

Blink>Network>StreamsAPI


Enabled by default (tracking bug)

Consensus & Standardization

After a feature ships in Chrome, the values listed here are not guaranteed to be up to date.

Owners

Search tags

TextEncoder, TextDecoder, TransformStream, ReadableStream, WritableStream, transform streams,

Last updated on 2020-11-09