summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Check for cc masquerading as gcc or clang in configure.Mark Adler2022-03-271-2/+8
|
* Remove destructive aspects of make distclean.Mark Adler2022-03-271-3/+1
|
* Separate out address sanitizing from warnings in configure.Mark Adler2022-03-271-2/+7
|
* Eliminate use of ULL constants.Mark Adler2022-03-271-3/+3
| | | | | | 0xffffffffffffffffULL was causing warnings for C99 usage. The suffix for the constant is not necessary anyway, so this commit removes them.
* Add fallthrough comments for gcc.Mark Adler2022-03-272-0/+24
| | | | Note intentional switch case fall throughs to avoid gcc warnings.
* Clean up minizip to reduce warnings for testing.Mark Adler2022-01-019-87/+96
| | | | Also fix Makefile test target and permit added compile options.
* Fix unztell64() in minizip to work past 4GB. (Daniël Hörchner)Mark Adler2022-01-011-0/+3
| | | | | | | | | | | | The issue is that unztell64() does not return the correct value if the position in the current file (in the ZIP archive) is beyond 4 GB. The cause is that unzReadCurrentFile() does not account for pfile_in_zip_read_info->stream.total_out at line 1854 of unzip.c wrapping around (it is a 32-bit variable). So, on line 1860 uTotalOutAfter can be *less* than uTotalOutBefore, propagating the wraparound to uOutThis, which in turn is added to pfile_in_zip_read_info->total_out_64. That has the effect of subtracting 4 GB.
* minizip warning fix if MAXU32 already defined. (gvollant)Mark Adler2021-12-311-3/+5
|
* Replace black/white with allow/block. (theresa-m)Mark Adler2021-12-312-15/+15
|
* Fix indentation in minizip's zip.c.Mark Adler2021-07-081-2/+2
|
* Improve portability of contrib/minizip.Mark Adler2021-02-104-10/+21
|
* Correct typo in blast.c.Mark Adler2021-01-171-1/+1
|
* Change macro name in inflate.c to avoid collision in VxWorks.Mark Adler2020-09-171-4/+4
|
* Clarify gz* function interfaces, referring to parameter names.Mark Adler2020-08-311-77/+76
|
* Fix error in comment on the polynomial representation of a byte.Mark Adler2019-07-091-1/+1
|
* Fix memory leak on error in gzlog.c.Mark Adler2019-05-251-2/+4
| | | | Thank you Adam Richter.
* Avoid adding empty gzip member after gzflush with Z_FINISH.Mark Adler2019-04-133-1/+13
|
* Explicitly note that the 32-bit check values are 32 bits.Mark Adler2019-04-051-5/+7
|
* Use ARM crc32 instructions if the ARM architecture has them.Mark Adler2019-02-171-3/+7
| | | | | | | The ARM crc32 instructions will be used only if an architecture is explicitly specified at compile time that has those instructions. For example, -march=armv8.1-a or -march=armv8-a+crc, or if the machine being compiled on has the instructions, -march=native.
* Add use of the ARMv8 crc32 instructions when requested.Mark Adler2019-02-171-0/+114
| | | | | | | | | | Define the macro Z_ARM_CRC32 at compile time to use the ARMv8 (aarch64) crc32x and crc32b instructions. This code does not check for the presence of the crc32 instructions. Those instructions are optional for ARMv8.0, though mandatory for ARMv8.1 and later. The use of the crc32 instructions is about ten times as fast as the software braided calculation of the CRC-32. This can noticeably speed up the decompression of gzip streams.
* Correct comment in crc32.c.Mark Adler2019-02-031-1/+2
|
* Don't bother computing check value after successful inflateSync().Mark Adler2019-01-023-8/+14
| | | | | | | | | | | inflateSync() is used to skip invalid deflate data, which means that the check value that was being computed is no longer useful. This commit turns off the check value computation, and furthermore allows a successful return if the compressed data terminated in a graceful manner. This commit also fixes a bug in the case that inflateSync() is used before a header is ever processed. In that case, there is no knowledge of a trailer, so the remainder is treated as raw.
* Use atomic test and set, if available, for dynamic CRC tables.Mark Adler2018-12-261-42/+112
|
* Speed up software CRC-32 computation by a factor of 1.5 to 3.Mark Adler2018-12-266-1096/+10209
| | | | | | | | 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.
* Add crc32_combine_gen() and crc32_combine_op() for fast combines.Mark Adler2018-11-042-0/+97
| | | | | | 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().
* Add tables for crc32_combine(), to speed it up by a factor of 200.Mark Adler2018-11-032-92/+396
|
* Fix the zran.c example to work on a multiple-member gzip file.Mark Adler2018-10-143-93/+204
|
* Add gznorm.c example, which normalizes gzip files.Mark Adler2018-10-072-0/+474
|
* Show all the codes for the maximum tables size in enough.c.Mark Adler2018-08-051-160/+191
|
* Clarify that prefix codes are counted in enough.c.Mark Adler2018-08-051-15/+15
| | | | | | | | There is no assurance that all prefix codes are reachable as optimal Huffman codes for the numbers of symbols encountered in a deflate block. This code considers all possible prefix codes, which might be a larger set than all possible Huffman codes, depending on the constraints.
* Use inline function instead of macro for index in enough.c.Mark Adler2018-08-051-4/+8
|
* Clean up code style in enough.c, update version.Mark Adler2018-08-011-211/+202
|
* Use a macro for the printf format of big_t in enough.c.Mark Adler2018-08-011-7/+3
|
* Use a structure to make globals in enough.c evident.Mark Adler2018-08-011-86/+89
|
* Assure that the number of bits for deflatePrime() is valid.Mark Adler2018-04-191-1/+2
|
* Fix a bug that can crash deflate on some input when using Z_FIXED.Mark Adler2018-04-193-70/+79
| | | | | | | | | | | | | | | | | | | | | 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.
* Correct the initialization requirements for deflateInit2().Mark Adler2018-01-311-2/+1
|
* Emphasize the need to continue decompressing gzip members.Mark Adler2018-01-081-3/+5
|
* Add legal disclaimer to README.Mark Adler2017-10-121-1/+4
|
* Fix deflateEnd() to not report an error at start of raw deflate.Mark Adler2017-10-121-1/+3
|
* Remove old assembler code in which bugs have manifested.Mark Adler2017-10-1218-6172/+0
| | | | | In addition, there is not sufficient gain from the inflate assembler code to warrant its inclusion.
* Make the names in functions declarations identical to definitions.Mark Adler2017-10-123-6/+6
|
* Avoid an undefined behavior of memcpy() in _tr_stored_block().Mark Adler2017-10-121-1/+2
| | | | | Allegedly the behavior of memcpy() is undefined if the source pointer is NULL, even if the number of bytes to copy is zero.
* Avoid undefined behaviors of memcpy() in gz*printf().Mark Adler2017-10-121-2/+2
|
* Avoid an undefined behavior of memcpy() in gzappend().Mark Adler2017-10-121-1/+1
|
* Avoid the use of ptrdiff_t.Mark Adler2017-06-032-11/+3
| | | | | | | | | | | | | | | | | This isn't the right type anyway to assure that it contains a pointer. That type would be intptr_t or uintptr_t. However the C99 standard says that those types are optional, so their use would not be portable. This commit simply uses size_t or whatever configure decided to use for size_t. That would be the same length as ptrdiff_t, and so will work just as well. The code checks to see if the length of the type used is the same as the length of a void pointer, so there is already protection against the use of the wrong type. The use of size_t (or ptrdiff_t) will almost always work, as all modern architectures have an array size that is the same as the pointer size. Only old segmented architectures would have to fall back to the slower CRC-32 calculation, where the amount of memory that can be accessed is larger than the maximum array size.
* Handle case where inflateSync used when header never processed.Mark Adler2017-04-161-0/+2
| | | | | | | | | If zlib and/or gzip header processing was requested, but a header was never provided and inflateSync was used successfully, then the inflate state would be inconsistent, trying to compute a check value but with no flags set. This commit sets the inflate mode to raw in this case, since there is no other assumption that can be made if a header was requested but never seen.
* Don't compute check value for raw inflate if asked to validate.Mark Adler2017-03-301-1/+1
|
* Add address checking in clang to -w option of configure.Mark Adler2017-02-181-2/+2
|
* Return an error if the gzputs string length can't fit in an int.Mark Adler2017-02-151-4/+7
|