approach alternative to #39 and #40, but on the same path to #35 and #4.
somewhat inspired by libjpeg.
idea is to add SPNG_IO_SUSPENDED error and return it when not enough data available.
and read_fn should return either negative io errors or num of bytes read.
no additional callbacks and functions needed, when new data available user will call previously failed spng_decode_scanline again, which will ask read_fn callback for new data.
approach alternative to #39 and #40, but on the same path to #35 and #4. somewhat inspired by libjpeg.
idea is to add
SPNG_IO_SUSPENDED
error and return it when not enough data available. andread_fn
should return either negative io errors or num of bytes read.no additional callbacks and functions needed, when new data available user will call previously failed
spng_decode_scanline
again, which will askread_fn
callback for new data.