Commit Graph

77 Commits

Author SHA1 Message Date
Mark Adler 62d6112a79 Clean up the usage of z_const and respect const usage within zlib.
This patch allows zlib to compile cleanly with the -Wcast-qual gcc
warning enabled, but only if ZLIB_CONST is defined, which adds
const to next_in and msg in z_stream and in the in_func prototype.
A --const option is added to ./configure which adds -DZLIB_CONST
to the compile flags, and adds -Wcast-qual to the compile flags
when ZLIBGCCWARN is set in the environment.
2012-08-13 00:02:40 -07:00
Mark Adler 2689b3cceb Change version number to 1.2.7.1. 2012-05-02 22:38:26 -07:00
Mark Adler 72e2c8f088 Change version number to 1.2.7. 2012-02-12 16:15:47 -08:00
Mark Adler 7b3f71ba5f Change version number to 1.2.6.1. 2012-01-29 21:15:24 -08:00
Mark Adler 0ddfbd2346 Change version number to 1.2.6. 2012-01-16 16:44:29 -08:00
Mark Adler 68f64498c2 Make sure that no extra inserting is done if the strategy changes. 2012-01-14 10:53:23 -08:00
Mark Adler 4f5779a8e7 Insert the first two strings in the hash table after a flush.
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.
2012-01-13 23:54:40 -06:00
Mark Adler 0b828b4aa6 Write out all of the available bits when using Z_BLOCK.
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.
2012-01-07 14:08:02 -08:00
Mark Adler 263b1a05b0 Allow deflatePrime() to insert bits in the middle of a stream.
This allows the insertion of multiple empty static blocks for the
purpose of efficiently bringing a stream to a byte boundary.
2012-01-07 14:03:07 -08:00
Mark Adler 19761b8506 Permit Z_NULL arguments to deflatePending.
This avoids having to create useless variables for return values
that aren't needed.
2011-12-29 00:15:44 -08:00
Mark Adler 9d55abc969 Avoid extraneous empty blocks when doing empty flushes.
Previously when doing an empty flush, a extra static or stored block
could be emitted before the requested empty static or stored block.
This patch prevents the emission of empty blocks by the deflate_*
functions.
2011-12-29 00:03:55 -08:00
Mark Adler f1ebdd6a9c Permit stronger flushes after Z_BLOCK flushes.
The incorporation of the Z_BLOCK flush did not update the rejection
of lower ranked flushes immediately after higher ranked flushes with
no more input data.  This prevented an empty Z_SYNC_FLUSH right after
a Z_BLOCK flush, which would be desired to bring the deflate stream
to a byte boundary conditionally on whether or not it was already at
a byte boundary.  This patch re-ranks Z_BLOCK above Z_NO_FLUSH but
below Z_PARTIAL_FLUSH, allowing stronger empty flushes to follow a
Z_BLOCK flush.
2011-12-28 23:57:14 -08:00
Mark Adler df60b50769 Change version numbers to 1.2.5.3. 2011-12-18 12:07:25 -08:00
Mark Adler afe7cf78d5 Enable dictionary setting in middle of stream, and keeping the dictionary.
This patch adds the deflateResetKeep() function to retain the sliding
window for the next deflate operation, and fixes an inflateResetKeep()
problem that came from inflate() not updating the window when the
stream completed.  This enables constructing and decompressing a series
of concatenated deflate streams where each can depend on the history of
uncompressed data that precedes it.

This generalizes deflateSetDictionary() and inflateSetDictionary() to
permit setting the dictionary in the middle of a stream for raw deflate
and inflate.  This in combination with the Keep functions enables a
scheme for updating files block by block with the transmission of
compressed data, where blocks are sent with deflateResetKeep() to
retain history for better compression, and deflateSetDictionary() is
used for blocks already present at the receiver to skip compression but
insert that data in the history, again for better compression.  The
corresponding inflate calls are done on the receiver side.
2011-12-08 00:13:52 -08:00
Mark Adler f442c1e89e Add a ./config --solo option to make zlib subset with no libary use
A common request has been the ability to compile zlib to require no
other libraries.  This --solo option provides that ability.  The price
is that the gz*, compress*, and uncompress functions are eliminated,
and that the user must provide memory allocation and free routines to
deflate and inflate when initializing.
2011-10-07 02:11:56 -07:00
Mark Adler 1250ac745d Add assertions to fill_window() in deflate.c to match comments. 2011-09-22 23:55:31 -07:00
Mark Adler 5cf0930ba5 Assure that high-water mark initialization is always applied in deflate. 2011-09-22 23:48:04 -07:00
Mark Adler faa03d5141 Avoid searching past window for Z_RLE strategy.
Without this, Z_RLE could under some circumstances read one byte past
the end of the allocated sliding window. This would normally not be a
problem unless the window is right at the end of an allocated page, or
if a bounds checker is being used.
2011-09-22 23:45:00 -07:00
Mark Adler d6cbbd5c64 Change version numbers to 1.2.5.2 and release dates
Also added "-motley" to ZLIB_VERSION in zlib.h, so that versions
in-between 1.2.5.1 and 1.2.5.2 that are pulled down from github
can be identified as such if bugs are reported on them.
2011-09-11 11:16:41 -07:00
Mark Adler 10daf0d4d7 zlib 1.2.5.1 2011-09-11 11:04:49 -07:00
Mark Adler 9712272c78 zlib 1.2.5 2011-09-09 23:35:10 -07:00
Mark Adler 7301420248 zlib 1.2.4.5 2011-09-09 23:34:55 -07:00
Mark Adler a7d70663cf zlib 1.2.4.4 2011-09-09 23:34:45 -07:00
Mark Adler f4498bea28 zlib 1.2.4.3 2011-09-09 23:34:38 -07:00
Mark Adler 7147f24cd7 zlib 1.2.4.2 2011-09-09 23:34:30 -07:00
Mark Adler 05d47d2627 zlib 1.2.4.1 2011-09-09 23:34:22 -07:00
Mark Adler 67cc20d004 zlib 1.2.4-pre1 2011-09-09 23:32:36 -07:00
Mark Adler 7751bd4c71 zlib 1.2.3.9 2011-09-09 23:27:26 -07:00
Mark Adler e0ff940e1a zlib 1.2.3.8 2011-09-09 23:27:17 -07:00
Mark Adler 7df877eccd zlib 1.2.3.7 2011-09-09 23:27:08 -07:00
Mark Adler dc5a43ebfa zlib 1.2.3.6 2011-09-09 23:26:58 -07:00
Mark Adler d004b04783 zlib 1.2.3.5 2011-09-09 23:26:49 -07:00
Mark Adler f6194ef39a zlib 1.2.3.4 2011-09-09 23:26:40 -07:00
Mark Adler 639be99788 zlib 1.2.3.3 2011-09-09 23:26:29 -07:00
Mark Adler d6231142d2 zlib 1.2.3.2 2011-09-09 23:25:38 -07:00
Mark Adler b1c19ca6d8 zlib 1.2.3.1 2011-09-09 23:25:27 -07:00
Mark Adler abf180a067 zlib 1.2.3 2011-09-09 23:25:17 -07:00
Mark Adler 9c3a583021 zlib 1.2.2.4 2011-09-09 23:24:52 -07:00
Mark Adler 6b8233bfe0 zlib 1.2.2.3 2011-09-09 23:24:43 -07:00
Mark Adler 0484693e17 zlib 1.2.2.2 2011-09-09 23:24:33 -07:00
Mark Adler 9811b53dd9 zlib 1.2.2.1 2011-09-09 23:24:24 -07:00
Mark Adler 79fbcdc939 zlib 1.2.2 2011-09-09 23:24:02 -07:00
Mark Adler 7a6955760b zlib 1.2.1.2 2011-09-09 23:23:45 -07:00
Mark Adler f0e76a6634 zlib 1.2.1.1 2011-09-09 23:23:38 -07:00
Mark Adler 7a33a861d1 zlib 1.2.1 2011-09-09 23:23:27 -07:00
Mark Adler a2506218cd zlib 1.2.0.8 2011-09-09 23:23:14 -07:00
Mark Adler b97ec631c6 zlib 1.2.0.7 2011-09-09 23:23:01 -07:00
Mark Adler f81ba93d4a zlib 1.2.0.6 2011-09-09 23:22:48 -07:00
Mark Adler 4b5a43a219 zlib 1.2.0.5 2011-09-09 23:22:37 -07:00
Mark Adler 086e982175 zlib 1.2.0.4 2011-09-09 23:22:30 -07:00