CompressionStream: writable property

Baseline 2023
Newly available

Since May 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.

We'd love to hear more about your role and the company you work for
Please help us by answering a few questions.

Note: This feature is available in Web Workers.

The writable read-only property of the CompressionStream interface returns a WritableStream.

Value

Examples

The following example returns a WritableStream from a CompressionStream.

js
let stream = new CompressionStream("gzip");
console.log(stream.writable); // A WritableStream

Specifications

Specification
Streams
# dom-generictransformstream-writable

Browser compatibility