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

fix: force gzip flush setting to Z_FULL_FLUSH #85

Merged
merged 1 commit into from
Oct 12, 2021

Conversation

nlf
Copy link
Contributor

@nlf nlf commented Jul 13, 2021

i tested a full matrix of combinations for both flush and level (i also did some experimenting with chunkSize but that yielded nothing meaningful), the combinations that resulted in identical packed results across osx/m1, osx/intel, ubuntu/intel, and arch/intel are as follows:

match: { flush: 0, level: 0 }
match: { flush: 1, level: 0 }
match: { flush: 2, level: 0 }
match: { flush: 3, level: 0 }
match: { flush: 3, level: 9 }

since setting the level to 0 is effectively no compression, that felt like a non-starter, so i went with setting flush to Z_FULL_FLUSH. this does yield a bit of a size increase as compared to the default of Z_NO_FLUSH (~15% on my test package which is 5.1mb unpacked), but that feels like a pretty reasonable tradeoff to get a bit more consistency

References

Related to #76

@wraithgar wraithgar merged commit a32b936 into main Oct 12, 2021
@wraithgar wraithgar deleted the nlf/tweak-gzip-settings branch October 12, 2021 21:32
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.

2 participants