summaryrefslogtreecommitdiff
path: root/deflate.h
Commit message (Collapse)AuthorAgeFilesLines
* Fix a bug that can crash deflate on some input when using Z_FIXED.Mark Adler2018-04-191-14/+11
| | | | | | | | | | | | | | | | | | | | | This bug was reported by Danilo Ramos of Eideticom, Inc. It has lain in wait 13 years before being found! The bug was introduced in zlib 1.2.2.2, with the addition of the Z_FIXED option. That option forces the use of fixed Huffman codes. For rare inputs with a large number of distant matches, the pending buffer into which the compressed data is written can overwrite the distance symbol table which it overlays. That results in corrupted output due to invalid distances, and can result in out-of-bound accesses, crashing the application. The fix here combines the distance buffer and literal/length buffers into a single symbol buffer. Now three bytes of pending buffer space are opened up for each literal or length/distance pair consumed, instead of the previous two bytes. This assures that the pending buffer cannot overwrite the symbol table, since the maximum fixed code compressed length/distance is 31 bits, and since there are four bytes of pending space for every three bytes of symbol space.
* zlib 1.2.9v1.2.9Mark Adler2016-12-311-1/+1
|
* Fix bugs in creating a very large gzip header.Mark Adler2016-12-041-9/+12
|
* Clean up type conversions.Mark Adler2016-10-111-3/+3
|
* Use const for static tree descriptions in deflate.Mark Adler2015-08-151-1/+1
| | | | This is in order to permit shared memory for these structures.
* Avoid use of DEBUG macro -- change to ZLIB_DEBUG.Mark Adler2015-07-281-2/+2
|
* Correct comment in deflate.h.Mark Adler2012-06-021-1/+1
|
* Insert the first two strings in the hash table after a flush.Mark Adler2012-01-131-0/+1
| | | | | | | | This allows deflate to generate the same output when continuing after a Z_SYNC_FLUSH vs. using deflateSetDictionary() after a Z_FULL_FLUSH or a deflateReset(). It also slightly improves compression when flushing by providing two more strings to possibly match at the start of the new block.
* Write out all of the available bits when using Z_BLOCK.Mark Adler2012-01-071-0/+1
| | | | | | | | Previously, the bit buffer would hold 1 to 16 bits after "all" of the output is provided after a Z_BLOCK deflate() call. Now at most seven bits remain in the output buffer after Z_BLOCK. flush_pending() now flushes the bit buffer before copying out the byte buffer, in order for it to really flush as much as possible.
* Remove second empty static block for Z_PARTIAL_FLUSH.Mark Adler2012-01-071-1/+0
| | | | | | | | | Z_PARTIAL_FLUSH would sometimes emit two empty static blocks instead of one in order to provide enough lookahead for inflate to be able to decode what was last compressed. inflate no longer needs that much lookahead, so this removes the possibility of emitting the second empty static block. Z_PARTIAL_FLUSH will now emit only one empty static block.
* Allow deflatePrime() to insert bits in the middle of a stream.Mark Adler2012-01-071-1/+4
| | | | | This allows the insertion of multiple empty static blocks for the purpose of efficiently bringing a stream to a byte boundary.
* zlib 1.2.5.1v1.2.5.1Mark Adler2011-09-111-1/+1
|
* zlib 1.2.5v1.2.5Mark Adler2011-09-091-1/+1
|
* zlib 1.2.4.5v1.2.4.5Mark Adler2011-09-091-11/+11
|
* zlib 1.2.4-pre1v1.2.4-pre1Mark Adler2011-09-091-2/+2
|
* zlib 1.2.3.4v1.2.3.4Mark Adler2011-09-091-1/+12
|
* zlib 1.2.3.1v1.2.3.1Mark Adler2011-09-091-1/+1
|
* zlib 1.2.2.4v1.2.2.4Mark Adler2011-09-091-2/+2
|
* zlib 1.2.2.1v1.2.2.1Mark Adler2011-09-091-1/+7
|
* zlib 1.2.1.2v1.2.1.2Mark Adler2011-09-091-1/+0
|
* zlib 1.2.0.5v1.2.0.5Mark Adler2011-09-091-2/+2
|
* zlib 1.2.0.4v1.2.0.4Mark Adler2011-09-091-1/+9
|
* zlib 1.2.0.2v1.2.0.2Mark Adler2011-09-091-3/+3
|
* zlib 1.2.0.1v1.2.0.1Mark Adler2011-09-091-1/+1
|
* zlib 1.1.4v1.1.4Mark Adler2011-09-091-1/+1
|
* zlib 1.1.3v1.1.3Mark Adler2011-09-091-3/+3
|
* zlib 1.1.1v1.1.1Mark Adler2011-09-091-2/+2
|
* zlib 1.1.0v1.1.0Mark Adler2011-09-091-0/+42
|
* zlib 1.0.7v1.0.7Mark Adler2011-09-091-2/+3
|
* zlib 1.0.4v1.0.4Mark Adler2011-09-091-2/+2
|
* zlib 1.0.1v1.0.1Mark Adler2011-09-091-14/+13
|
* zlib 1.0-prev1.0-preMark Adler2011-09-091-12/+13
|
* zlib 0.99v0.99Mark Adler2011-09-091-13/+13
|
* zlib 0.95v0.95Mark Adler2011-09-091-0/+1
|
* zlib 0.94v0.94Mark Adler2011-09-091-23/+24
|
* zlib 0.93v0.93Mark Adler2011-09-091-0/+1
|
* zlib 0.92v0.92Mark Adler2011-09-091-5/+5
|
* zlib 0.9v0.9Mark Adler2011-09-091-1/+3
|
* zlib 0.71v0.71Mark Adler2011-09-091-0/+270