compression code unification

Unify the compression code so that inflate calls are localized to a common
routine.  Ground work for filter selection support.  Minor API changes to use
void* not byte* for data parameters.  Unification of some of the compression
code with the decompression code; IDAT_size replaces IDAT_read_size and
zbuffer_size, IDAT reading and writing is no longer controlled by the size of
the compression buffer.

Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
John Bowler
2015-11-30 13:39:49 -08:00
parent 6bbc74d880
commit 4792c8a751
15 changed files with 609 additions and 537 deletions

View File

@@ -129,7 +129,7 @@ png_read_sig(png_structrp png_ptr, png_inforp info_ptr)
/* Read data, and (optionally) run it through the CRC. */
void /* PRIVATE */
png_crc_read(png_structrp png_ptr, png_bytep buf, png_uint_32 length)
png_crc_read(png_structrp png_ptr, png_voidp buf, png_uint_32 length)
{
if (png_ptr == NULL)
return;
@@ -1382,8 +1382,6 @@ png_handle_iCCP(png_structrp png_ptr, png_inforp info_ptr)
{
memcpy(info_ptr->iccp_name, keyword,
keyword_length+1);
info_ptr->iccp_proflen =
profile_length;
info_ptr->iccp_profile = profile;
png_ptr->read_buffer = NULL; /*steal*/
info_ptr->free_me |= PNG_FREE_ICCP;