-
Notifications
You must be signed in to change notification settings - Fork 167
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use STORE as default method. #917
Conversation
Build succeeded. |
@@ -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"}))); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm reading the JSZip API correctly, you theoretically don't need both of these specified. It appears that the generate
compression is a fallback if no explicit level is set on the file
. Does that match your understanding?
If that is the case, I'd be interested as to why or how the existing code was compressing the mimetype.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added tests now that show the issue appears when saving from an exisiting odf file. In new odt files, the mimetype is not compressed.
6ff091e
to
cf9b9e9
Compare
Build succeeded. |
This is important because the file "mimetype" should *never* be compressed.
cf9b9e9
to
7d30654
Compare
Build succeeded. |
Build succeeded. |
Ah... that makes more sense 😁 |
Use STORE as default method.
This is important because the file "mimetype" should never be compressed.