JavaScript Library for Reading & Writing Large ZIP Files 

 Open Source Free JavaScript API for Reading, Writing, Deleting & Manipulating Large ZIP Files Online.

Zip.js is an Open Source JavaScript library allows software developers to ZIP and Unzip file inside their own applications. It provides a low-level API for reading and writing large zip files (up to 4GB with File writer API).  The library is fully compatible with all web browsers such as Chrome, Firefox, Safari 6 and Internet Explorer 10.

The library can handle multiple types of data thanks to a generic API.  If you want to read a ZIP file and would like to store its files into a variable, you need to use a ZIP.Reader object for reading the compressed ZIP data. If you would like to write uncompressed file data into the variable then need to use a ZIP.Writer object.

This library depends on Typed array (WebGL) and optionally you can use other APIs such as Web workers for spawning background workers running scripts in parallel to their main page, File API for programmatically selecting files and accessing their data, File writer API for writing to files from web applications and File directories & system for navigating file system hierarchies.

Previous Next

Getting Started with Zip.js

Add zip.js, z-worker.js, deflate.js, and inflate.js in your project. Please also include zip.js script in your HTML page using the following command.

Add ZIP.JS to HTML page

 script type="text/javascript" src="/lib/zip.js"></script> 

Read ZIP Files via JavaScript Library

The ZIP.JS library provides functionally for reading the content of a ZIP file inside JavaScript applications. First of all, you need to create a ZipReader object. The ZipReader object helps out the users in reading the content of a ZIP file. The library allows users to read file names, ZIP entries listing, compressed data size, uncompressed data size, last modification date, file comment, uncompressed data checksum and more.

 Writing Files to ZIP via JavaScript

The ZIP.JS library enables software programmers to write data into the zip file. First of all you need to create a ZipWriter object to write output data. You can easily add a new entry into the ZIP by providing file name and location. Once the task is done the success callback function will inform about the successful entry and compression. In the end please do remember to close the opened zip and terminate the associated web workers.

 

 English