mtpng
mtpng copied to clipboard
Removal of unsafe and panics
This could be interesting to merge into master. It removes all panics from code, use results where possible, and also removes unsafe code, by using the rust implementation of deflate. There is also an attempt to create some fuzz testing, but probably needs more work.
That's cool, I'll take a look over it when I have a chance!
How's the performance with the pure-Rust deflate? Regressing that is my main worry; I would strongly prefer to keep using zlib if it provides significantly better compression speed, and would not accept patches that degrade performance.
I haven't done much performance testing, but didn't seen any big changes in speed, when using miniz. But I will make some tests to access performance. I also made miniz a feature, so it's possible to pick if one wants zlib or miniz. I just want to have an option of using a pure rust implementation. I also removed all the panics to avoid having the lib panic.