mtpng
mtpng copied to clipboard
A parallelized PNG encoder in Rust
I know the crate is specifically for multi-threaded encoding/decoding. I have managed to get sub millisecond encoding per image for my use case of encoding hundreds of small png files...
PNG is an extensible format - you can add custom Ancillary chunks to a file, and decoders will ignore any such chunk that they don't recognize. If an Ancillary chunk...
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....
Updates dependencies to latest version. Also updates the edition to 2018 with accompanying cargo fix changes.
https://github.com/rust-lang/libz-sys#zlib-ng Enabling this feature flag changes the libz backend to the heavily optimized zlib-ng.
See https://crates.io/crates/crc32fast for benchmark data. The speedup is noticeable when the image is multiple MBs. Tests on my machine show 5% faster on 8MB screenshot.
Add a fuzzing harness adapted from the command-line tool. It decodes the input with png crate, encodes it with mtpng, decodes the result with png again and verifies that the...
Does anyone have any experience in compiling this to WASM please?
Fuzzing is a powerful tool for correctness verification. The gist of it is that it generates a lot of semi-random inputs really fast and uses execution path tracing to generate...
Large sample files in the git repo should be fine but these are also included in the cargo distribution, weighing it down. Exclude these?