Compression Streams API
ELI5 - The Vibe Check
The Compression Streams API lets the browser gzip or deflate data on the fly, right in JavaScript, without shipping a compression library over the wire just to compress things. Need to shrink a big blob before uploading it, or decompress a downloaded file? The browser can just do that natively now.
Real Talk
The Compression Streams API provides native CompressionStream and DecompressionStream constructors for gzip and deflate compression directly in the browser, operating on ReadableStream and WritableStream pairs. It removes the need for JavaScript compression libraries for common use cases like compressing request bodies or decompressing downloaded archives.
Show Me The Code
const compressed = new Response(
file.stream().pipeThrough(new CompressionStream('gzip'))
);
const blob = await compressed.blob();
When You'll Hear This
"We compress large form uploads with CompressionStream before sending them, no library needed." / "The Compression Streams API cut our client side bundle by removing a compression library as a dependency."
Related Terms
Blob Storage
Blob storage is just a fancy name for storing unstructured data — images, videos, PDFs, audio files, any binary stuff.
Bundle
Imagine your code is a pile of LEGO instructions split across 50 tiny papers.
Fetch
Fetch is the modern, built-in JavaScript way to make HTTP requests to APIs. You tell it a URL, it goes and gets the data, and you handle the response.
Web Worker
JavaScript normally runs on one thread, which means heavy computation freezes your UI.