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 "max" level alias; various level-related warnings #224

Merged
merged 8 commits into from
Apr 22, 2020

Conversation

RReverser
Copy link
Contributor

@RReverser RReverser commented Apr 20, 2020

  • Show a deprecation warning for Options::from_preset(4) / -o 4 as per Is preset 4 deprecated or incorrect? #221. Can be still removed later, but for now at least avoids confusion.
  • Show warning for usage of levels 4 and above for Zopfli and Libdeflate. This is not immediately obvious to users, but such levels end up iterating over same parameters as level 3 for these compressors, since there are no fine-tuned compressor options.
  • Adds Options::max_compression and -o max to always refer to best compression as discussed in Is preset 4 deprecated or incorrect? #221.
  • Warns about usage of levels that don't exist yet. Previously these would silently downgrade to -o 6, but I think it's worth showing a warning now that we have explicit max_compression method / option.

It's not obvious immediately that these levels don't have any effect on libdeflater and Zopfli, since they don't iterate over zlib-specific fine-tuned options.

Hence, show warning so that user knows they're getting "downgraded" to level 3.
@RReverser RReverser changed the title Add "max" level alias; more level warnings Add "max" level alias; various level-related warnings Apr 20, 2020
src/main.rs Outdated Show resolved Hide resolved
@shssoichiro shssoichiro merged commit b06e077 into shssoichiro:master Apr 22, 2020
@RReverser RReverser deleted the level-warnings branch April 22, 2020 17:40
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