-
Notifications
You must be signed in to change notification settings - Fork 15
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
Set a default gzip compression level globally #138
Conversation
I forgot to mention, but this started as a refactor because I think the |
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.
Looks good! (Only one complaint about language ...)
I haven’t checked in detail whether the logic is still equivalent, but I’ll trust you and the tests.
I set a default threads at one point, but had to conclude that this changed the logic and changed it back. Also the reason to choose level 1 by default is that currently python-isal is chosen for compression when it is available. Setting it to 5 or 6 would change this behavior. So I think the logic is still equivalent, except that level 1 is chosen rather than level 2 (python-isal default) but that is OK (and more consistent). |
Thanks! |
This simplifies the previous setup where the default was determined by the backend.
I set the default to 1 for now. Most people will have python-isal installed, and this would have been the default for
None
-level compression for most users. I prefer promoting python-isal anywhere possible and as xopen states on the README that it chooses the most efficient way possible a level of 1 seems appropriate.I am also open to setting it to 5, however. I don't think it is that important. As most upstream applications have their own preferred default anyway.