Try to fix some of the errors
- fixed some build errors due to invalid test code
- tried to debug what was going on with decoding, but failed.
- this should work if you use:
`convert -verbose -quality 00 in.png out.png`
compress::deflate: Fix < 0 check on unsigned int
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
compress::deflate: Fix off-by-one size of counts array
The highest index of the array should be MAXBITS,
hence length = MAXBITS + 1.
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
decoder_bufsiz: Allow PLTE with bit depth 4
Not sure why these lines were there in the first place.
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
Abort on attempt to create chunk reader at invalid position
To improve debuggability of bugs similar to the previous commit. Such a
bug could also occur in user code.
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
plte_read: Finish chunk reader properly
Call io::read at EOF so that the chunk reader knows to read the
checksum.
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
Add missing ? operators
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
Fix typos/incorrect names
Signed-off-by: Lassi Pulkkinen <lassi@pulk.fi>
Update my name
Add a .mailmap, update copyright headers
zlib::decompress: improve docs
Signed-off-by: Drew DeVault <sir@cmpwn.com>
compress::zlib: introduce decompress_error
Matches the similar inflate_error function.
Signed-off-by: Drew DeVault <sir@cmpwn.com>
compress::flate: introduce inflate_error
Extracts the inflate-specific error condition from an opaque error
condition in io::error.
Signed-off-by: Drew DeVault <sir@cmpwn.com>
compress::flate: fix incorrect assertion