DEV Community

loading...
Cover image for GZIP on the Browser

GZIP on the Browser

Okiki
I'm a part-time web dev, if you need a hand on any project, I would be happy to help.
Originally published at blog.okikio.dev on ・1 min read

Out of curiosity I created a small demo detailing how you can implement GZIP in the browser, I used fflate for the GZIP compression, and pretty-bytes to convert bytes into human readable format, the demo is really small but as an example it should be more than good enough. I based it on bundle.js.org. Interestingly, I have yet to find a website that lets you see the GZIP size of some random text, all the ones I have found so far expect you to upload a file, the little demo takes a string as an input compresses it, and gives you the final size.

I suggest checking out bundle.js.org it's a specialized for bundling, minifying and compressing js, all locally, right on your browser.

Check out the product hunt page for bundle.js.org.

Discussion (0)