![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
compression-streams-polyfill
Advanced tools
Lightweight polyfill/ponyfill for the Compression Streams API
Lightweight polyfill/ponyfill for the Compression Streams API
Install:
npm i compression-streams-polyfill # or yarn add, or pnpm add
Import:
import 'compression-streams-polyfill';
// CompressionStream and DecompressionStream are now available
If your environment doesn't support ES Modules:
require('compression-streams-polyfill');
If you want to load from a CDN in the browser:
<!--
You should use either UNPKG or jsDelivr (i.e. only one of the following)
You can specify the version, e.g. with compression-streams-polyfill@0.1.4
-->
<script src="https://unpkg.com/compression-streams-polyfill"></script>
<script src="https://cdn.jsdelivr.net/npm/compression-streams-polyfill"></script>
This polyfill is almost perfectly spec-compliant. Nonetheless, if you'd like to avoid adding CompressionStream
and DecompressionStream
to the global scope, you can use the ponyfill.
Note that you must supply your own TransformStream
implementation to use the ponyfill (though TransformStream
is available in most modern browsers).
import { makeCompressionStream, makeDecompressionStream } from 'compression-streams-polyfill/ponyfill';
// If you'd like to also ponyfill TransformStream:
// import { TransformStream } from 'web-streams-polyfill/ponyfill';
const CompressionStream = makeCompressionStream(TransformStream);
const DecompressionStream = makeDecompressionStream(TransformStream);
This polyfill is based on fflate and is therefore very fast. It tends to be between 20% slower and 5% faster than Chromium's native CompressionStream
and DecompressionStream
. The CompressionStream
polyfill also yields similar compression ratios to the native implementation.
The polyfill's full bundle size is about 17kB minified, or 7kB gzipped.
MIT
FAQs
Lightweight polyfill/ponyfill for the Compression Streams API
The npm package compression-streams-polyfill receives a total of 1,360 weekly downloads. As such, compression-streams-polyfill popularity was classified as popular.
We found that compression-streams-polyfill demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.