Use deflate rather than flate2 for deflate encoding. Fixes #2 #46
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.
This changes the encoder to use deflate-rs, which is written in rust rather than flate2 which is wrapper to the c library miniz. This would fix #2.
I don't know if it should be merged yet, the roundtrip unit test seems to work fine, but it may need some more testing on other images. (There's a failing doc test, but it failed before I did any changes so I presume it's unrelated, as it complains about a missing file). I've tested the decoder on a fair number of different inputs, but there could still be bugs in it (but feel free to help out with the decoder if you find any). It's also going to be a bit slower than using flate2 for now.
My editor also ran rustfmt on the file I changed, so if that's an issue I'll change the PR to avoid that if you want.
Lastly, I wasn't sure if I should pin the full version, or if I should only depend on "0.7" to avoid having to update image-png in case of bugfixes to deflate.