Another PNG encoder


#1

This is another PNG encoder.

  • It’s 100% safe.
  • It has a simple and a less-simple API.
  • flate2 (miniz) does all of the hard ZLIB stuff.
  • Memory use should be small, but I don’t know how much memory flate2 uses. Memory use (again, ignoring miniz) can also be made constant if that’s important.
  • The encoder is reusable.
  • I don’t know why anybody would need to stream a PNG, but it can do that, too.
  • It can be pure Rust if flate2 is configured to use miniz_oxide.