Commit Graph

175 Commits

Author SHA1 Message Date
Mark Adler 5c42a230b7 Correct argument types for 64-bit combine functions. 2024-02-11 15:42:08 -08:00
Mark Adler 96d3e9e3dd Expand on the deflate strategy parameter in zlib.h. 2024-02-07 10:48:55 -08:00
Mark Adler 9f0f2d4f9f Change version number on develop branch to 1.3.1.1. 2024-01-22 13:07:41 -08:00
Mark Adler 51b7f2abda zlib 1.3.1 2024-01-22 10:32:37 -08:00
Mark Adler 36e369e1a5 Note that the len2 argument of crc_combine*() must be non-negative.
If it is negative, then the code will enter an infinite loop.
2024-01-13 22:30:30 -08:00
Paul Ivanov 643e17b749 Correct repeated words in source file comments and a readme. 2023-11-14 18:44:32 -08:00
Mark Adler 3a98b57e55 Change version number on develop branch to 1.3.0.1. 2023-08-18 13:23:07 -07:00
Mark Adler 09155eaa2f zlib 1.3 2023-08-18 01:45:36 -07:00
Mark Adler 22fc20898b Clarify requirement in zlib.h to avoid multiple flush markers. 2023-08-17 17:11:11 -07:00
Mark Adler a88f727dbe Document in zlib.h the initialization of stream fields by the Init
and Reset functions.
2023-07-10 11:27:50 -07:00
Mark Adler 263a982866 Correct comment in zlib.h on os setting in gzip header.
The comment said that the os is set to 255, when in fact it has
been set to the current os since zlib 1.2.3. Or at least our best
guess at the os made at compile time.
2023-05-16 20:28:59 -07:00
Paul Marquess 48c3741002 Remove duplicate "the" in zlib.h. 2023-05-01 14:06:43 -07:00
Mark Adler e9d5486e66 Remove K&R function definitions from zlib.
C2X has removed K&R definitions from the C function syntax.
Though the standard has not yet been approved, some high-profile
compilers are now issuing warnings when such definitions are
encountered.
2023-04-15 21:17:31 -07:00
Mark Adler 41fda48fc2 Change version number on develop branch to 1.2.13.1. 2022-10-15 09:02:21 -07:00
Mark Adler 04f42ceca4 zlib 1.2.13 2022-10-12 22:06:55 -07:00
Mark Adler 84c6716a48 Minor formatting improvements.
No code changes.
2022-10-05 15:17:52 -07:00
Mark Adler 5752b171fd Fix some typos.
No code changes.
2022-08-23 15:35:13 -07:00
Mark Adler a4c17581d8 Change version number on develop branch to 1.2.12.1. 2022-03-27 18:07:49 -07:00
Mark Adler 21767c654d zlib 1.2.12 2022-03-27 16:05:02 -07:00
Mark Adler e54494e6bc Clarify gz* function interfaces, referring to parameter names. 2020-08-31 12:53:58 -07:00
Mark Adler 0e96d8e7c7 Explicitly note that the 32-bit check values are 32 bits. 2019-04-05 15:27:47 -07:00
Mark Adler f8719f5ae5 Speed up software CRC-32 computation by a factor of 1.5 to 3.
Use the interleaved method of Kadatch and Jenkins in order to make
use of pipelined instructions through multiple ALUs in a single
core. This also speeds up and simplifies the combination of CRCs,
and updates the functions to pre-calculate and use an operator for
CRC combination.
2018-12-26 12:26:52 -08:00
Mark Adler 41d86c73b2 Add crc32_combine_gen() and crc32_combine_op() for fast combines.
When the same len2 is used repeatedly, it is faster to use
crc32_combine_gen() to generate an operator, that is then used to
combine CRCs with crc32_combine_op().
2018-11-04 10:31:46 -08:00
Mark Adler e99813dbfe Correct the initialization requirements for deflateInit2(). 2018-01-31 13:24:12 -08:00
Mark Adler bf88202e31 Emphasize the need to continue decompressing gzip members. 2018-01-08 18:16:05 -08:00
Mark Adler a577351394 Make the names in functions declarations identical to definitions. 2017-10-12 20:03:51 -07:00
Mark Adler f9694097dd Permit a deflateParams() parameter change as soon as possible.
This commit allows a parameter change even if the input data has
not all been compressed and copied to the application output
buffer, so long as all of the input data has been compressed to
the internal pending output buffer. This also allows an immediate
deflateParams change so long as there have been no deflate calls
since initialization or reset.
2017-02-15 22:38:55 -08:00
Mark Adler 5ff989033e Cygwin does not have _wopen(), so do not create gzopen_w() there. 2017-01-16 09:38:36 -08:00
Mark Adler 7d60b86782 Change version number to 1.2.11.1. 2017-01-15 22:46:03 -08:00
Mark Adler cacf7f1d4e zlib 1.2.11 2017-01-15 09:29:40 -08:00
Mark Adler cbbd20302c Permit immediate deflateParams changes before any deflate input.
This permits deflateParams to change the strategy and level right
after deflateInit, without having to wait until a header has been
written. The parameters can be changed immediately up until the
first deflate call that consumes any input data.
2017-01-15 09:29:40 -08:00
Mark Adler 11ceaed751 Change version number to 1.2.10.1. 2017-01-15 09:07:08 -08:00
Mark Adler 4a090adef8 zlib 1.2.10 2017-01-02 18:21:29 -08:00
Mark Adler 52aa5501ec Minor edits and clarifications of comments. 2017-01-01 22:24:37 -08:00
Mark Adler 20e472546e Change version number to zlib 1.2.9.1. 2017-01-01 22:24:17 -08:00
Mark Adler 2fa463bacf zlib 1.2.9 2016-12-31 23:37:10 -08:00
Mark Adler b9ae6f0079 Add crc32_z() and adler32_z() functions with size_t lengths. 2016-12-31 17:50:52 -08:00
Mark Adler 50dca6d127 Fix init macros to use z_ prefix when requested. 2016-12-30 20:00:56 -08:00
Mark Adler ee7d7b5dda Add deflateGetDictionary() function.
Per request, but its utility is likely to be very limited. See the
comments in zlib.h.
2016-12-30 16:29:56 -08:00
Mark Adler 77bc4f8944 Add gzfwrite(), duplicating the interface of fwrite(). 2016-12-04 18:47:34 -08:00
Mark Adler 44dfd831d2 Add gzfread(), duplicating the interface of fread(). 2016-12-04 18:35:41 -08:00
Mark Adler 123f9cfaf7 Clean up gz* function return values.
In some cases the return values did not match the documentation,
or the documentation did not document all of the return values.
gzprintf() now consistently returns negative values on error,
which matches the behavior of the stdio fprintf() function.
2016-12-04 07:48:47 -08:00
Mark Adler 7161ad76e2 Assure that deflateParams() will not switch functions mid-block.
This alters the specification in zlib.h, so that deflateParams()
will not change any parameters if there is not enough output space
in the event that a block is emitted in order to allow switching
the compression function.
2016-12-04 07:48:47 -08:00
Mark Adler 37281ac222 Add uncompress2() function, which returns the input size used. 2016-12-04 07:48:47 -08:00
Mark Adler 001300d0d9 Minor edits to the documentation in source file contents. 2016-12-04 07:48:41 -08:00
Mark Adler 03614c56ad Fix some typos. 2016-10-30 08:49:01 -07:00
Mark Adler 77fd7e56bf Document the rejection of 256-byte window requests in zlib.h. 2016-10-24 16:00:51 -07:00
Mark Adler ebbc57393d Avoid recursive gzgetc() macro call.
Recursive macro calls are normally caught by the preprocessor and
avoided. This commit avoids the possibility of a problem entirely.
2016-10-14 13:16:07 -07:00
Mark Adler 7096424f23 Clean up type conversions. 2016-10-11 22:15:50 -07:00
Mark Adler 3fb251b363 Remove dummy structure declarations for old buggy compilers.
While woolly mammoths still roamed the Earth and before Atlantis
sunk into the ocean, there were C compilers that could not handle
forward structure references, e.g. "struct name;". zlib dutifully
provided a work-around for such compilers. That work-around is no
longer needed, and, per the recommendation of a security audit of
the zlib code by Trail of Bits and TrustInSoft, in support of the
Mozilla Foundation, should be removed since what a compiler will
do with this is technically undefined. From the report: "there is
no telling what interactions the bug could have in the future with
link-time optimizations and type-based alias analyses, both
features that are present (but not default) in clang."
2016-09-21 20:34:04 -07:00