Fix Png Encoder Compression#1054
Merged
JimBobSquarePants merged 19 commits intomasterfrom Nov 27, 2019
Merged
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) |
Member
Author
Member
Author
|
I've done my best. Get stuck in please. |
Member
Author
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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