Skip to content
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

Merged
merged 4 commits into from
Sep 2, 2015
Merged

Conversation

vandenoever
Copy link
Member

This is important because the file "mimetype" should never be compressed.

@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/2409/

@@ -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"})));
Copy link
Contributor

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.

Copy link
Member Author

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.

@vandenoever vandenoever force-pushed the mimetype branch 2 times, most recently from 6ff091e to cf9b9e9 Compare September 2, 2015 07:47
@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/2410/

@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/2411/

@kogmbh-ci
Copy link

Build succeeded.
Refer to this link for build results: http://ci.kogmbh.com/jenkins/job/WebODF-PullReq/2412/

@peitschie
Copy link
Contributor

Ah... that makes more sense 😁
Please :shipit: !!!

vandenoever added a commit that referenced this pull request Sep 2, 2015
Use STORE as default method.
@vandenoever vandenoever merged commit 51730a9 into webodf:master Sep 2, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants