/streaming-png

Perfectly streaming PNG image decoding.

Primary LanguageHaskellGNU Lesser General Public License v3.0LGPL-3.0

streaming-png

streaming-png is a streaming PNG decoding library written in pure Haskell (without libpng) and based on streaming and streaming-bytestring by michaelt. I plan to implement encoding and better support for PNG metadata soon too (see GOALS.md).

Based on current benchmarks, streaming-png consistently beats JuicyPixels by about 5-10%, when decoding PNGs files from strict ByteStrings to storable vectors of pixel data. Over a network, this difference should be much greater since streaming-png can decode incrementally as the file is downloaded, rather than having to wait until the whole file is in memory before starting decoding.

This library comes with a small interface to zlib through streaming-bytestring too. See Streaming.Zlib. This may be factored out into a separate package in the future.