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

@@ -30,12 +30,12 @@
* to read more than 64K on a 16 bit machine.
*/
void /* PRIVATE */
png_read_data(png_structrp png_ptr, png_bytep data, png_size_t length)
png_read_data(png_structrp png_ptr, png_voidp data, png_size_t length)
{
png_debug1(4, "reading %d bytes", (int)length);
if (png_ptr->rw_data_fn != NULL)
png_ptr->rw_data_fn(png_ptr, data, length);
png_ptr->rw_data_fn(png_ptr, png_voidcast(png_bytep,data), length);
else
png_app_error(png_ptr, "No read function");