DecompressionStream
Baseline 2023Newly available
Since May 2023, this feature works across the latest devices and browser versions. This feature might not work in older devices or browsers.
Note: This feature is available in Web Workers.
The DecompressionStream
interface of the Compression Streams API is an API for decompressing a stream of data.
Constructor
DecompressionStream()
-
Creates a new
DecompressionStream
Instance properties
DecompressionStream.readable
-
Returns the
ReadableStream
instance controlled by this object. DecompressionStream.writable
-
Returns the
WritableStream
instance controlled by this object.
Examples
In this example a blob is decompressed using gzip compression.
js
const ds = new DecompressionStream("gzip");
const decompressedStream = blob.stream().pipeThrough(ds);
Specifications
Specification |
---|
Compression # decompression-stream |
Browser compatibility
Report problems with this compatibility data on GitHubdesktop | mobile | server | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
DecompressionStream | ||||||||||||||
DecompressionStream() constructor | ||||||||||||||
"deflate" compression | ||||||||||||||
"deflate-raw" compression | ||||||||||||||
"gzip" compression | ||||||||||||||
readable | ||||||||||||||
writable |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
- Partial support
- Partial support
- Has more compatibility info.
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.