Compression Playground
Compress and decompress with gzip, deflate, and brotli, and compare ratios.
- Recent results are kept in this browser's local storage until you clear them.
History kept on this device
Recent results are kept in this browser's local storage until you clear them. - Processing happens in this page. No application server receives your input.
Runs in your browser
Processing happens in this page. No application server receives your input.
Input
Output
Run Compress to compare gzip, deflate, deflate-raw, and brotli side by side, or switch to Decompress to unpack binary data.
What this tool does
Compresses UTF-8 text or binary files across gzip (RFC 1952), deflate (zlib-wrapped RFC 1950), deflate-raw (RFC 1951), and brotli (RFC 7932) inside a dedicated Web Worker, comparing compressed byte sizes, compression ratios, and elapsed time side by side, and decompresses any single format back to binary download or Base64.
Three engines and why each is used
- Platform CompressionStream / DecompressionStream: Used at default compression level (
6) when supported by the runtime for zero-overhead streaming ofgzip,deflate, anddeflate-raw. - fflate: Used in the worker whenever a custom compression level (
0..9) is selected or when a platform stream does not supportdeflate-raw. - brotli-wasm: Executes RFC 7932 Brotli compression (quality
0..11) and decompression via WebAssembly insidecompress.worker.ts.
Decompression and format detection
Decompression runs against the explicitly selected format (gzip, deflate, deflate-raw, or brotli). When decompression fails and the input starts with the 2-byte gzip magic header (0x1f 0x8b) while a non-gzip format is selected, the error message highlights that the input starts with the gzip magic bytes.
Limits
Output is binary; it is offered as a download or as Base64, never as text in the pane. Ratios are for this input only and say nothing about a corpus.
- Maximum input file size:
95.4 MB; maximum decompressed output budget:64.0 MB.
Related tools
- Base64 / Base32 / Base58 / Base85 (
/text/base64) for encoding and decoding Base64, Base32, Base58, and Ascii85 payloads. - Hex / Text Converter (
/text/hex) for inspecting raw binary headers and magic bytes in hexadecimal. - Unicode Inspector (
/text/unicode) for inspecting UTF-8 byte sequences and code points before compression.
Scope: this covers the page itself. Your browser, operating system, clipboard, downloads, extensions, and crash recovery may keep copies, and a compromised site origin would not be protected.