Gzip and Base64
Compress text and encode it, or take a compressed blob back to text.
Result
Good to know
- gzip, deflate and deflate-raw are the three the platform provides. Brotli is not among them — asking for it throws, so it is not offered.
- The three differ only in what wraps the compressed data: gzip adds a header and a CRC, zlib deflate a two-byte header and a checksum, raw deflate nothing at all.
- Short text comes out larger than it went in, and that is correct: the header and checksum cost more than the compression saves until there is enough repetition to find.
- Compression happens in your browser, in a stream. Nothing you paste is sent anywhere.
27 views