[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

@@ -516,6 +516,30 @@ setting sCAL_PRECISION default 5
setting ZBUF_SIZE default 8192
# This is the size of the decompression buffer used when counting or checking
# the decompressed size of an LZ stream from a compressed ancilliary chunk; the
# decompressed data is never used so a different size may be optimal. This size
# was determined using contrib/libtests/timepng.c with compressed zTXt data
# around 11MByte in size. Slight speed improvements (up to about 14% in
# timepng) can be achieved by very large increases (to 32kbyte) on regular data,
# but highly compressible data shows only around 2% improvement. The size is
# chosen to minimize the effects of DoS attacks based on using very large
# amounts of highly compressible data.
setting INFLATE_BUF_SIZE default 1024
# This is the maximum amount of IDAT data that the sequential reader will
# process at one time. The setting does not affect the size of IDAT chunks
# read, just the amount read at once. Neither does it affect the progressive
# reader, which processes just the amount of data the application gives it.
# The sequential reader is currently unable to process more than one IDAT at
# once - it has to read and process each one in turn. There is no point setting
# this to a value larger than the IDAT chunks typically encountered (it would
# just waste memory) but there may be some point in reducing it below the value
# of ZBUF_SIZE (the size of IDAT chunks written by libpng.)
setting IDAT_READ_SIZE default PNG_ZBUF_SIZE
# Ancillary chunks
chunk bKGD
chunk cHRM

View File

@@ -3,7 +3,7 @@
/* pnglibconf.h - library build configuration */
/* Libpng 1.6.0beta17 - March 6, 2012 */
/* Libpng 1.6.0beta17 - March 9, 2012 */
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
@@ -26,6 +26,8 @@
#define PNG_COST_SHIFT 3
#define PNG_DEFAULT_READ_MACROS 1
#define PNG_GAMMA_THRESHOLD_FIXED 5000
#define PNG_IDAT_READ_SIZE PNG_ZBUF_SIZE
#define PNG_INFLATE_BUF_SIZE 1024
#define PNG_MAX_GAMMA_8 11
#define PNG_QUANTIZE_BLUE_BITS 5
#define PNG_QUANTIZE_GREEN_BITS 5