--- url: "https://web.dev/blog/compressionstreams" titulek: "Compression Streams are now supported on all browsers | Blog | web.dev" h1: "Compression Streams are now supported on all browsers Stay organized with collections Save and categorize content based on your preferences." popis: "" jazyk: "en" kanonicka: "https://web.dev/blog/compressionstreams" drobecky: ["Blog", "Compression Streams are now supported on all browsers"] zdroj: "live" wayback_snapshot: "" stazeno: "2026-09-14 00:55:01" znaku: 1651 slov: 185 kodovani: "iso-8859-2" sha256: "329bb980d36c5323f7eac697562cd4b24eadc7dcaeb06af4965f1ce3d756e9c1" --- Compression Streams are now supported on all browsers Stay organized with collections Save and categorize content based on your preferences. Browser Support 80 80 113 16.4 [Source](https://developer.mozilla.org/docs/Web/API/CompressionStream/CompressionStream) The [Compression Streams API](https://developer.mozilla.org/docs/Web/API/Compression_Streams_API) is for compressing and decompressing streams of data using the gzip or deflate (or deflate-raw) formats. Using the built-in compression of the Compression Streams API, JavaScript applications do not need to include a compression library, making the download size of the application smaller. This useful API is now supported across all browsers. Compress data The following snippet shows how to compress data: `const readableStream = await fetch('lorem.txt').then( (response) => response.body ); const compressedReadableStream = readableStream.pipeThrough( new CompressionStream('gzip') );` Decompress data To decompress, pipe a compressed stream through the decompression stream. `const decompressedReadableStream = compressedReadableStream.pipeThrough( new DecompressionStream('gzip') );` Demo Except as otherwise noted, the content of this page is licensed under the [Creative Commons Attribution 4.0 License](https://creativecommons.org/licenses/by/4.0/), and code samples are licensed under the [Apache 2.0 License](https://www.apache.org/licenses/LICENSE-2.0). For details, see the [Google Developers Site Policies](https://developers.google.com/site-policies). Java is a registered trademark of Oracle and/or its affiliates. Last updated 2023-11-02 UTC.