[libpng16] Deflate/inflate was reworked to move common zlib calls into single

functions [rw]util.c.  A new shared keyword check routine was also added
and the 'zbuf' is no longer allocated on progressive read.  It is now
possible to call png_inflate() incrementally.
This commit is contained in:
John Bowler
2012-03-09 09:15:18 -06:00
committed by Glenn Randers-Pehrson
parent 6038b80277
commit b5d0051dcb
15 changed files with 1579 additions and 1475 deletions

View File

@@ -1070,7 +1070,24 @@ png_get_user_chunk_ptr(png_const_structrp png_ptr)
png_size_t PNGAPI
png_get_compression_buffer_size(png_const_structrp png_ptr)
{
return (png_ptr ? png_ptr->zbuf_size : 0);
if (png_ptr == NULL)
return 0;
# ifdef PNG_WRITE_SUPPORTED
if (png_ptr->mode & PNG_IS_READ_STRUCT)
# endif
{
# ifdef PNG_SEQUENTIAL_READ_SUPPORTED
return png_ptr->IDAT_read_size;
# else
return PNG_IDAT_READ_SIZE;
# endif
}
# ifdef PNG_WRITE_SUPPORTED
else
return png_ptr->zbuffer_size;
# endif
}
#ifdef PNG_SET_USER_LIMITS_SUPPORTED