- Apr 14, 2019
-
-
Mark Adler authored
-
- Oct 13, 2017
-
-
Mark Adler authored
-
Mark Adler authored
-
- Feb 16, 2017
-
-
Mark Adler authored
-
Mark Adler authored
-
- Jan 15, 2017
-
- Jan 03, 2017
-
-
Mark Adler authored
-
- Jan 01, 2017
-
- Dec 31, 2016
-
-
Mark Adler authored
Limit read() and write() requests to sizes that fit in an int. This allows storing the return value in an int, and avoiding the need to use or construct an ssize_t type. This is required for Microsoft C, whose _read and _write functions take an unsigned request and return an int.
-
Mark Adler authored
-
- Dec 05, 2016
-
-
Mark Adler authored
-
- Dec 04, 2016
-
-
Mark Adler authored
Normally these are set to size_t and ssize_t. But if they do not exist, then they are set to the smallest integer type that can contain a pointer. size_t is unsigned and ssize_t is signed.
-
Mark Adler authored
gzsetparams() was using Z_PARTIAL_FLUSH when it could use Z_BLOCK instead. This commit uses Z_BLOCK, which avoids emitting an unnecessary ten bits into the stream.
-
Mark Adler authored
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.
-
Mark Adler authored
-
- Oct 12, 2016
-
-
Mark Adler authored
-
- Apr 05, 2016
-
-
Mark Adler authored
-
- Jul 29, 2015
-
-
Mark Adler authored
-
- Jul 06, 2015
-
-
Mark Adler authored
-
- Apr 14, 2013
-
-
Mark Adler authored
-
- Mar 25, 2013
-
- Mar 24, 2013
-
-
Mark Adler authored
You would still need to run zlib2ansi on all of the *.c files.
-
- Mar 23, 2013
-
-
Mark Adler authored
The function is only available if stdarg.h is available.
-
- Oct 02, 2012
-
-
Mark Adler authored
If the deflateInit2() called for the first gzwrite() failed with a Z_MEM_ERROR, then a subsequent gzclose() would try to free an already freed pointer. This fixes that.
-
- Sep 30, 2012
-
-
Mark Adler authored
A gzopen() to write (mode "w") followed immediately by a gzclose() would output an empty zero-length file. What it should do is write an empty gzip file, with the gzip header, empty deflate content, and gzip trailer totalling 20 bytes. This fixes it to do that.
-
- Aug 24, 2012
-
-
Mark Adler authored
Avoid the use of an uninitialized value when the write buffers have not been initialized. A recent change to avoid the use of strm-> next_in in order to resolve some const conflicts added the use of state->in in its place. This patch avoids the use of state->in when it is not initialized. Nothing bad would actually happen, since two variables set to the same unintialized value are subtracted. However valgrind was rightly complaining. So this fixes that.
-
- Aug 13, 2012
-
-
Mark Adler authored
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.
-
- Mar 03, 2012
-
-
Mark Adler authored
-
Mark Adler authored
-
- Feb 02, 2012
-
-
Mark Adler authored
gzflags() was put in gzwrite.c in order to be compiled exactly the same as gzprintf(), so that it was guaranteed to return the correct information. However that causes a static linkage to zlib to bring in many routines that are often not used. All that is required to duplicate the compilation environment of gzprintf() is to include gzguts.h. So that is now done in zutil.c to assure that the correct flags are returned.
-
- Jan 29, 2012
-
-
Mark Adler authored
When successful, gzputc would return the second argument. If the second argument were -1, gzputc would return -1 instead of the character written, which was 255. However the -1 would not be distinguishable from an error. Now gzputc returns 255 in that case.
- Dec 14, 2011
-
-
Mark Adler authored
Z_BUF_ERROR was also being used for an unsuccessful gzungetc and for buffer lengths that didn't fit in an int. Those uses were changed to Z_DATA_ERROR in order to assure that Z_BUF_ERROR occurs only when a premature end of input occurs, indicating that gzclearerr() can be used.
-
- Dec 11, 2011
-
-
Mark Adler authored
gzwrite.c had hard-coded parameters to deflateInit2() which could contradict compile-time options for the use of less memory and fewer code bits. This patch suggested by Karsten Saunte fixes that.
-
- Oct 02, 2011
-
-
Mark Adler authored
-
Mark Adler authored
This also moves some of the same from zconf.h to gzguts.h. A new function, gzflags(), was created to pass the compilation flags related to vsnprintf usage back to zlibCompileFlags() in zutil.c. In the process, various compiler configuration files were updated to include gzflags(), as well as the new gzgetc_() function added when the gzgetc() macro was introduced in a previous patch.
-
- Oct 01, 2011
-
-
Mark Adler authored
-
- Sep 27, 2011
-
-
Mark Adler authored
-
- Sep 11, 2011
-
- Sep 10, 2011
-