TextEncoderStream and TextDecoderStream APIs

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

Working draft or equivalent

Status in Chromium

Blink>Network>StreamsAPI


Enabled by default (tracking bug) in:

  • Chrome for desktop release 71
  • Chrome for Android release 71
  • Android WebView release 71
  • Opera release 58
  • Opera for Android release 58

Consensus & Standardization

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

Owners

Last updated on 2018-09-14