Navigation Menu

Skip to content

Commit

Permalink
issue #7 : load a zip file
Browse files Browse the repository at this point in the history
  • Loading branch information
dduponchel committed Nov 26, 2011
1 parent 5adf03b commit f02df57
Show file tree
Hide file tree
Showing 5 changed files with 1,218 additions and 14 deletions.
14 changes: 8 additions & 6 deletions jszip-deflate.js
Expand Up @@ -5,7 +5,7 @@
* main function to JSZip (DEFLATE compression method).
* Everything else was written by M. Izumo.
*
* Original code can be found here: http://www.onicos.com/staff/iz/amuse/javascript/expert/inflate.txt
* Original code can be found here: http://www.onicos.com/staff/iz/amuse/javascript/expert/deflate.txt
*/

if(!JSZip)
Expand Down Expand Up @@ -1683,11 +1683,13 @@ var zip_deflate = function(str, level) {
//

// we add the compression method for JSZip
JSZip.compressions["DEFLATE"] = {
magic : "\x08\x00",
compress : function (content) {
return zip_deflate(content);
}
if(!JSZip.compressions["DEFLATE"]) {
JSZip.compressions["DEFLATE"] = {
magic : "\x08\x00",
compress : zip_deflate
}
} else {
JSZip.compressions["DEFLATE"].compress = zip_deflate;
}

})();

0 comments on commit f02df57

Please sign in to comment.