summaryrefslogtreecommitdiff
path: root/FAQ (unfollow)
Commit message (Collapse)AuthorFilesLines
2017-01-02Fix compilation with --solo and --debug combined.Mark Adler1-1/+1
However this ends up not really being solo, since it has to include external libraries.
2017-01-02Add warnings when compiling with assembler code.Mark Adler2-1/+4
There have been many reports of bugs in the assembler codes intended to speed up deflate and inflate. They are third-party contributions in contrib, and so are not supported by the zlib maintainers.
2017-01-02Remove files to be installed before copying them in Makefile.in.Mark Adler1-0/+5
2017-01-02Fix bug in gzwrite.c that produced corrupt gzip files.Mark Adler1-0/+1
2017-01-02Fix bug in deflate_stored() for zero-length input.Mark Adler1-18/+19
2017-01-01Minor edits and clarifications of comments.Mark Adler1-7/+8
2017-01-01Avoid warnings on snprintf() return value.Mark Adler1-4/+4
2017-01-01Change version number to zlib 1.2.9.1.Mark Adler25-62/+65
2017-01-01Fix some stray 1.2.8.1 version numbers.Mark Adler2-4/+4
2016-12-31zlib 1.2.9v1.2.9Mark Adler55-580/+777
2016-12-31Update Visual Studio project files (AraHaan).Mark Adler31-13/+5706
2016-12-31Add crc32_z() and adler32_z() functions with size_t lengths.Mark Adler3-8/+38
2016-12-31Make z_size_t unsigned long for non-standard C.Mark Adler3-9/+21
Also declare z_size_t when compiling solo.
2016-12-31Avoid the need for ssize_t.Mark Adler6-67/+19
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.
2016-12-31Use a uniform approach for the largest value of an unsigned type.Mark Adler3-3/+3
2016-12-30Use intptr_t for z_ssize_t on MSVC.Mark Adler3-3/+18
2016-12-30Avoid some random compiler warnings on various platforms.Mark Adler6-12/+14
2016-12-30Allow minigzip to compile when testing with ./configure --solo.Mark Adler1-1/+1
2016-12-30Replace as400 with os400 for OS/400 support (Monnerat).Mark Adler7-444/+518
2016-12-30Detect clang in cc version.Mark Adler1-0/+1
2016-12-30Fix init macros to use z_ prefix when requested.Mark Adler4-16/+47
2016-12-30Fix character encoding and link in contrib README.Mark Adler1-2/+2
2016-12-30Use snprintf() for later versions of Microsoft C.Mark Adler2-5/+4
2016-12-30Add deflateGetDictionary() function.Mark Adler2-0/+43
Per request, but its utility is likely to be very limited. See the comments in zlib.h.
2016-12-30No need to check for NULL argument to free().Mark Adler1-4/+2
2016-12-04Add gzfwrite(), duplicating the interface of fwrite().Mark Adler2-40/+112
2016-12-04Add gzfread(), duplicating the interface of fread().Mark Adler2-40/+126
2016-12-04Fix compile option for when z_size_t needs to be a long long.Mark Adler4-1/+7
2016-12-04Create z_size_t and z_ssize_t types.Mark Adler8-17/+144
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.
2016-12-04Don't need to emit an empty fixed block when changing parameters.Mark Adler1-1/+1
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.
2016-12-04Clean up gz* function return values.Mark Adler3-34/+37
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-04Speed up deflation for level 0 (storing).Mark Adler1-78/+215
The previous code slid the window and the hash table and copied every input byte three times in order to just write the data as stored blocks with no compression. This commit minimizes sliding and copying, especially for large input and output buffers. Level 0 compression is now more than 20 times faster than before the commit. Most of the speedup is due to deferring hash table slides until deflateParams() is called to change the compression level away from 0. More speedup is due to copying directly from next_in to next_out when the amounts of available input data and output space permit it, avoiding the intermediate pending buffer. Additionally, only the last 32K of the used input data is copied back to the sliding window when large input buffers are provided.
2016-12-04Assure that deflateParams() will not switch functions mid-block.Mark Adler2-22/+24
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-04Explicitly ignore a return value in gzwrite.c.Mark Adler1-1/+1
2016-12-04Increase verbosity required to warn about bit length overflow.Mark Adler1-2/+2
When debugging the Huffman coding would warn about resulting codes greater than 15 bits in length. This is handled properly, and is not uncommon. This increases the verbosity of the warning by one, so that it is not displayed by default.
2016-12-04Add uncompress2() function, which returns the input size used.Mark Adler2-18/+39
2016-12-04Minor edits to the documentation in source file contents.Mark Adler4-93/+109
2016-12-04Fix bugs in creating a very large gzip header.Mark Adler2-169/+191
2016-12-04Add --debug (-d) option to ./configure to define ZLIB_DEBUG.Mark Adler1-0/+6
2016-12-04Use memcpy for stored blocks.Mark Adler1-30/+7
This speeds up level 0 by about a factor of three, as compared to the previous byte-at-a-time loop. We can do much better though. A later commit avoids this copy for level 0 with large buffers, instead copying directly from the input to the output. This commit still speeds up storing incompressible data found when compressing normally.
2016-10-30Fix some typos.Mark Adler10-29/+29
2016-10-27Fix bug when level 0 used with Z_HUFFMAN or Z_RLE.Mark Adler1-3/+4
Compression level 0 requests no compression, using only stored blocks. When Z_HUFFMAN or Z_RLE was used with level 0 (granted, an odd choice, but permitted), the resulting blocks were mostly fixed or dynamic. The reason is that deflate_stored() was not being called in that case. The compressed data was valid, but it was not what the application requested. This commit assures that only stored blocks are emitted for compression level 0, regardless of the strategy selected.
2016-10-26Clean up and comment the use of local for static.Mark Adler4-6/+6
2016-10-25Make a noble effort at setting OS_CODE correctly.Mark Adler1-14/+30
This updates the OS_CODE determination at compile time to match as closely as possible the operating system mappings documented in the PKWare APPNOTE.TXT version 6.3.4, section 4.4.2.2. That byte in the gzip header is used by nobody for anything, as far as I can tell. However we might as well try to set it appropriately.
2016-10-24Do a more thorough check of the state for every stream call.Mark Adler3-41/+72
This verifies that the state has been initialized, that it is the expected type of state, deflate or inflate, and that at least the first several bytes of the internal state have not been clobbered.
2016-10-24Document the rejection of 256-byte window requests in zlib.h.Mark Adler1-0/+4
2016-10-24Reject a window size of 256 bytes if not using the zlib wrapper.Mark Adler1-1/+1
There is a bug in deflate for windowBits == 8 (256-byte window). As a result, zlib silently changes a request for 8 to a request for 9 (512-byte window), and sets the zlib header accordingly so that the decompressor knows to use a 512-byte window. However if deflateInit2() is used for raw deflate or gzip streams, then there is no indication that the request was not honored, and the application might assume that it can use a 256-byte window when decompressing. This commit returns an error if the user requests a 256-byte window when using raw deflate or gzip encoding.
2016-10-14Avoid obfuscating use of default case in inftrees.c.Mark Adler1-1/+1
2016-10-14Move macro definition in deflate.c to where it is used.Mark Adler1-3/+4
This avoid defining a macro that is never used when not debugging.
2016-10-14Avoid recursive gzgetc() macro call.Mark Adler1-2/+2
Recursive macro calls are normally caught by the preprocessor and avoided. This commit avoids the possibility of a problem entirely.