Twinside / Juicy.Pixels

Haskell library to load & save pictures
BSD 3-Clause "New" or "Revised" License
236 stars 58 forks source link

Support for Incremental Input? #110

Open Zemyla opened 9 years ago

Zemyla commented 9 years ago

Can the various decoding functions be augmented to support incremental input, such as is supported in the Data.Binary library used under the hood? This would allow decoding images from non-file inputs without having to load the entire image file into memory, and then parse the entire image file in memory.

Twinside commented 9 years ago

Right now, the answer is clearly no, every format working at bit level, violently extract a big bytestring from binary and put it in a bit reader structure (for performance reasons). It could be interesting, but it requires a major rewriting of nearly all file parsers, which is not likely to happen soon (for motivation reasons :])