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

Skip to content
This repository was archived by the owner on Oct 14, 2025. It is now read-only.

Conversation

@slashnick
Copy link

When a compressed file is larger than the original file, the "percent removed" value underflows.

Before

$ echo hello > test.txt
$ zopfli -v test.txt
Saving to: test.txt.gz
Iteration 0: 153 bit
compressed block size: 7 (0k) (unc: 6)
Original Size: 6, Deflate: 8, Compression: 307445734561825882112.000000% Removed
Original Size: 6, Gzip: 26, Compression: 307445734561825882112.000000% Removed
$ zopfli --zlib -v test.txt
...
Original Size: 6, Zlib: 14, Compression: 307445734561825882112.000000% Removed

After

$ zopfli -v test.txt
Saving to: test.txt.gz
Iteration 0: 153 bit
compressed block size: 7 (0k) (unc: 6)
Original Size: 6, Deflate: 8, Compression: -33.333333% Removed
Original Size: 6, Gzip: 26, Compression: -333.333333% Removed
$ zopfli --zlib -v test.txt
...
Original Size: 6, Zlib: 14, Compression: -133.333333% Removed

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant