Take me home

Unzipping files with JavaScript

Written by August Lilleaas, published February 01, 2010

I released two new javascript libraries yesterday, both related to reading the contents of Zip files. JSUnzip reads the Zip container. Zip files are really just that — a container file, not a compression library. Zip can use one of many compression algorithms. The most common is deflate/inflate, which JSInflate can uncompress. I did not write JSInflate, I only repackaged a script written by a Masanao Izumo, and wrote a few tests for it.

So what the heck is the use for a Zip reader in javascript? I won’t tell you the details just yet, so I’ll boil it down to this: I’m working on a HTML5 based application, where you can drag Zip packaged files into your browser:, and I needed to unpack and uncompress these files. That also probably sounds pretty useless, but keep in mind that the Zip format is used for more than just Zip files ;)


Questions or comments?

Feel free to contact me on Twitter, @augustl, or e-mail me at august@augustl.com.