nigeltao.github.io
Summary: Wuffs’ PNG image decoder is memory-safe but can also clock between
1.22x and 2.75x faster than
libpng, the widely used open source C
implementation. It’s also faster than the
libspng,
lodepng and
stb image
C libraries as well as the most popular Go and Rust PNG libraries. High
performance is achieved by SIMD-acceleration, 8-byte wide input and copies when
bit-twiddling and
zlib-decompressing the entire image all-at-once (into one
large intermediate buffer) instead of one row at a time (into smaller,
re-usable buffers). All-at-once requires more intermediate memory but allows
substantially more of the image to be decoded in the