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 zlib level 6 when making zip files #309

Merged
merged 1 commit into from
Feb 13, 2025
Merged

Use zlib level 6 when making zip files #309

merged 1 commit into from
Feb 13, 2025

Conversation

lencioni
Copy link
Contributor

It seems that by default Archiver uses zlib level 1, which prioritizes compression speed over compression ratio. By default, zlib uses level 6, which is a nice balance between compression speed and compression ratio. In my testing, level 6 does indeed seem to be a sweet spot, and seems to make my test cases about 14% smaller without sacrificing much performance.

Since these zips are immediately uploaded, stored, and downloaded again somewhere else, I am hopeful that this 14% size difference will more than make up for slightly slower compression speeds.

It seems that by default Archiver uses zlib level 1, which prioritizes
compression speed over compression ratio. By default, zlib uses level 6,
which is a nice balance between compression speed and compression ratio.
In my testing, level 6 does indeed seem to be a sweet spot, and seems to
make my test cases about 14% smaller without sacrificing much
performance.

Since these zips are immediately uploaded, stored, and downloaded again
somewhere else, I am hopeful that this 14% size difference will more
than make up for slightly slower compression speeds.
@lencioni lencioni merged commit 8fdb4f4 into main Feb 13, 2025
3 checks passed
@lencioni lencioni deleted the zlib-level branch February 13, 2025 16:22
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.

1 participant