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

ZopfliPNG error: Decompress Zlib data failed. #62

Closed
f2d opened this issue Nov 15, 2020 · 4 comments
Closed

ZopfliPNG error: Decompress Zlib data failed. #62

f2d opened this issue Nov 15, 2020 · 4 comments

Comments

@f2d
Copy link

f2d commented Nov 15, 2020

Hi.

While trying to optimize one ORA file saved years ago in MyPaint (which overall went very well, 7 MB cut down to 4), I got an error message about one PNG inside:

-> data/layer200.png
ZopfliPNG failed!
Decompress Zlib data failed.

Running Leanify directly on this extracted PNG gives the same message and the file is unchanged, only modtime.
I tried all 4 versions of the last build (243) from https://ci.appveyor.com/project/JayXon/leanify - same error message.

OptiPNG, OxiPNG, TruePNG all have no problem optimizing it.
Running Leanify directly after them also has no problems and saves some more bytes (same result as OxiPNG -Z alone, but faster).

I'm attaching the unoptimized PNG file here.
layer200.png

@JayXon
Copy link
Owner

JayXon commented Nov 17, 2020

If you use -v it will show that the png has incorrect ADLER32

Decoding error 58: invalid ADLER32 encountered (checking ADLER32 can be disabled)

Maybe I should disable the ADLER32 check in lodepng, since PNG already has CRC32 check for the IDAT.

@JayXon
Copy link
Owner

JayXon commented Nov 25, 2020

Turns out the file is not corrupt at all, and it was a bug in lodepng that's already fixed.
I've updated the lodepng copy in leanify and opened a PR to update lodepng in zopfli: google/zopfli#176

@f2d
Copy link
Author

f2d commented Nov 25, 2020

It works now, and somehow cuts 2 bytes more than oxipng 4.0.0 (with -Z) from this PNG file.

By the way, Windows Defender says nothing about build 243, but reports all build 244 artifacts as Trojan:Win32/Spursint.F!cl and deletes the downloaded files right away.

VirusTotal results are different with each other, so I guess it must be a false-positive.

In order of scanning:
win_x64_MSVC - 1 of 70 (mistaken build number in filename here, but the file is right)
win_x64_Clang - 1 of 71
win_x86_Clang - 3 of 71
win_x86_MSVC - 5 of 71

I allowed it as an exclusion for now, but not sure what else I can do.

Anecdotally, Windows Defender complaining about Leanify - one single thing out of a mega collection of optimizers - was how I found this project in the first place, and it was exactly what I needed.

@JayXon
Copy link
Owner

JayXon commented Nov 25, 2020

I use leanify on itself since it support exe files, it uses similar tricks used in some packers to save size, and antivirus software are known to identify packers as virus simply because a lot of virus use packers.

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

No branches or pull requests

2 participants