Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add "max" level alias; various level-related warnings - #224

Merged
shssoichiro merged 8 commits into
oxipng:masterfrom
RReverser:level-warnings
Apr 22, 2020
Merged

Add "max" level alias; various level-related warnings#224
shssoichiro merged 8 commits into
oxipng:masterfrom
RReverser:level-warnings

Conversation

@RReverser

@RReverser RReverser commented Apr 20, 2020

Copy link
Copy Markdown
Contributor
  • 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
Comment thread src/main.rs Outdated
@shssoichiro
shssoichiro merged commit b06e077 into oxipng: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