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

Add an option to set the DEFLATE level. #201

Merged
merged 2 commits into from
Feb 20, 2015
Merged

Conversation

dduponchel
Copy link
Collaborator

This commit adds a new option, compressionOptions. If it contains a field
level, it is used by the DEFLATE compression to set the compression level :
6 by default or any level between 1 (best speed) and 9 (best compression).

Fix #165.

This commit adds a new option, `compressionOptions`. If it contains a field
`level`, it is used by the DEFLATE compression to set the compression level :
6 by default or any level between 1 (best speed) and 9 (best compression).

Fix Stuk#165.
Note : if the entry is *already* compressed (coming from a compressed zip file),
calling `generate()` with a different compression level won't update the entry.
The reason is simple : JSZip doesn't know how was compressed the content and
how to match the compression level with the implementation we use.
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Grammar: "...doesn't know how compressed the content was and how to..."

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.

@Stuk
Copy link
Owner

Stuk commented Feb 19, 2015

Otherwise looks good 👍

Stuk added a commit that referenced this pull request Feb 20, 2015
Add an option to set the DEFLATE level.
@Stuk Stuk merged commit d329558 into Stuk:master Feb 20, 2015
@dduponchel dduponchel deleted the deflate_level branch February 20, 2015 07:33
@dduponchel dduponchel mentioned this pull request Mar 10, 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.

Specify compress level
2 participants