Skip to content

Commit

Permalink
Use STORE as default method.
Browse files Browse the repository at this point in the history
This is important because the file "mimetype" should *never* be compressed.
  • Loading branch information
vandenoever committed Sep 2, 2015
1 parent ab637bd commit 6ff091e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions webodf/lib/core/Zip.js
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ core.Zip = function Zip(url, entriesReadCallback) {
* @return {undefined}
*/
function save(filename, data, compressed, date) {
zip.file(filename, data, {date: date, compression: compressed ? null : "STORE"});
zip.file(filename, data, {date: date, compression: compressed ? "DEFLATE" : "STORE"});
}
/**
* Removes entry from the zip.
Expand All @@ -168,7 +168,7 @@ core.Zip = function Zip(url, entriesReadCallback) {
*/
function createByteArray(successCallback, errorCallback) {
try {
successCallback(/**@type{!Uint8Array}*/(zip.generate({type: "uint8array", compression: "DEFLATE"})));
successCallback(/**@type{!Uint8Array}*/(zip.generate({type: "uint8array", compression: "STORE"})));
} catch(/**@type{!Error}*/e) {
errorCallback(e.message);
}
Expand Down

0 comments on commit 6ff091e

Please sign in to comment.