-
-
Notifications
You must be signed in to change notification settings - Fork 888
Fix Png Encoder Compression #1054
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1054 +/- ##
=========================================
- Coverage 89.93% 89.9% -0.04%
=========================================
Files 1124 1131 +7
Lines 49772 50654 +882
Branches 3513 3717 +204
=========================================
+ Hits 44764 45539 +775
- Misses 4287 4357 +70
- Partials 721 758 +37
Continue to review full report at Codecov.
|
| /// </summary> | ||
| /// <param name="curMatch">The current match.</param> | ||
| /// <returns>True if a match greater than the minimum length is found</returns> | ||
| private bool FindLongestMatch(int curMatch) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
I've done my best. Get stuck in please. |
|
I think I'm going to go ahead and merge this. It isn't slow and we get good compression. Any other gains we can make down the line. |

Prerequisites
Description
Replaces the .NET
DeflateStreamimplementation used by the png encoder with a fully managed one ported from SharpZipLib and heavily modified.This fixes #1027 with a 6x improvement in compression with the supplied image.
Benchmarks are.... ok I guess.... I managed to make the ported
DeflaterOuputStreamand accompanying classes around 40% faster but we've lost a fair amount of performance compared to the native SIMD accelerated version used by .NET Core. I think the massive compression gains are worth it though but if anyone fancies a crack at further optimization please give it a go.Before
After