]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
5 years agoRemove current directory library include path in configure not present in cmake. 683/head
Nathan Moinvaziri [Sun, 5 Jul 2020 18:29:18 +0000 (11:29 -0700)] 
Remove current directory library include path in configure not present in cmake.

5 years agoAdd likely/unlikely hinting to all deflate algorithms.
Hans Kristian Rosbach [Wed, 1 Jul 2020 13:06:37 +0000 (15:06 +0200)] 
Add likely/unlikely hinting to all deflate algorithms.

5 years agoAdded CI instances for ARM/AARCH64 without acle/neon.
Nathan Moinvaziri [Wed, 1 Jul 2020 23:45:50 +0000 (16:45 -0700)] 
Added CI instances for ARM/AARCH64 without acle/neon.

5 years agoFixed configure applying -march flags globally for ARM.
Nathan Moinvaziri [Wed, 1 Jul 2020 23:39:47 +0000 (16:39 -0700)] 
Fixed configure applying -march flags globally for ARM.
Fixed -mfpu=neon not being applied on arm|arm7 if available.

5 years agoRemove duplicate Windows GCC CI instance.
Nathan Moinvaziri [Thu, 2 Jul 2020 05:00:22 +0000 (22:00 -0700)] 
Remove duplicate Windows GCC CI instance.

5 years agoAdded powerpc instances to CI for configure.
Nathan Moinvaziri [Thu, 2 Jul 2020 01:39:22 +0000 (18:39 -0700)] 
Added powerpc instances to CI for configure.

5 years agoMerge pull request #668 from nmoinvaz/fixes/apply-float-abi-c-flags
Hans Kristian Rosbach [Thu, 2 Jul 2020 11:10:49 +0000 (13:10 +0200)] 
Merge pull request #668 from nmoinvaz/fixes/apply-float-abi-c-flags

Fixed issues with float abi in cmake

5 years agoClean up comments about setting C flags.
Nathan Moinvaziri [Tue, 30 Jun 2020 02:59:12 +0000 (19:59 -0700)] 
Clean up comments about setting C flags.

5 years agoModify cmake to apply native flag when using intrinsic flags same as configure.
Nathan Moinvaziri [Sun, 28 Jun 2020 19:37:50 +0000 (12:37 -0700)] 
Modify cmake to apply native flag when using intrinsic flags same as configure.

5 years agoApply float abi flag to all files in cmake (same as configure). 668/head
Nathan Moinvaziri [Wed, 1 Jul 2020 03:57:47 +0000 (20:57 -0700)] 
Apply float abi flag to all files in cmake (same as configure).
Don't override -mfloat-abi if set via -DCMAKE_C_FLAGS in cmake.
Only set -mfloat-abi=softfp if compiler ends in eabi in cmake. (same as configure).

5 years agoRemove some extra ci configurations.
Nathan Moinvaziri [Wed, 1 Jul 2020 03:27:08 +0000 (20:27 -0700)] 
Remove some extra ci configurations.

5 years agoApply neonflag only to files using neon instructions with configure.
Nathan Moinvaziri [Wed, 1 Jul 2020 04:13:43 +0000 (21:13 -0700)] 
Apply neonflag only to files using neon instructions with configure.

5 years agoFixed integer casting and signed comparison warning in test_gzio.
Nathan Moinvaziri [Wed, 1 Jul 2020 03:00:30 +0000 (20:00 -0700)] 
Fixed integer casting and signed comparison warning in test_gzio.

    example.c(199,57): warning C4267: '=': conversion from 'size_t' to 'int', possible loss of data
    example.c:207:32: warning: comparison between signed and unsigned integer expressions

5 years agoImprove deflatePrime test by wrapping gzip header and footer around deflate stream.
Nathan Moinvaziri [Wed, 1 Jul 2020 02:58:46 +0000 (19:58 -0700)] 
Improve deflatePrime test by wrapping gzip header and footer around deflate stream.

5 years agoFixed bad shift operation warning in deflatePrime.
Nathan Moinvaziri [Sun, 28 Jun 2020 20:05:11 +0000 (13:05 -0700)] 
Fixed bad shift operation warning in deflatePrime.
Check that bits value is not greater than bits allowed by value type.

  CID 293475 (#2-4 of 4): Bad bit shift operation (BAD_SHIFT)
  In expression 1UL << put, left shifting by more than 63 bits has undefined behavior.

5 years agoFixed whitespace in adler32_avx and adler32_ssse3.
Nathan Moinvaziri [Tue, 30 Jun 2020 02:28:33 +0000 (19:28 -0700)] 
Fixed whitespace in adler32_avx and adler32_ssse3.

5 years agoFixed unsigned integer overflow in adler32_avx and adler32_ssse3 when len is zero.
Nathan Moinvaziri [Tue, 30 Jun 2020 00:51:52 +0000 (17:51 -0700)] 
Fixed unsigned integer overflow in adler32_avx and adler32_ssse3 when len is zero.

    adler32_avx.c:108:15: runtime error: unsigned integer overflow: 0 - 1 cannot be represented in type 'size_t' (aka 'unsigned long')

5 years agoUse local match_len variable in deflate_slow.
Nathan Moinvaziri [Sun, 28 Jun 2020 21:14:24 +0000 (14:14 -0700)] 
Use local match_len variable in deflate_slow.
Remove match_len from deflate internal_state.

5 years agoFixed wrong size being used in calloc in test_deflate_set_header.
Nathan Moinvaziri [Sun, 28 Jun 2020 20:32:00 +0000 (13:32 -0700)] 
Fixed wrong size being used in calloc in test_deflate_set_header.

    CID 293478 (#1 of 1): Wrong size argument (SIZEOF_MISMATCH)
    suspicious_sizeof: Passing argument 1UL to function calloc that returns a pointer of type zng_gz_header * is suspicious because a multiple of sizeof (zng_gz_header) /*80*/ is expected.

5 years agoUse calloc to allocate memory and set to zero for memory sanitizer.
Nathan Moinvaziri [Sun, 28 Jun 2020 21:45:22 +0000 (14:45 -0700)] 
Use calloc to allocate memory and set to zero for memory sanitizer.

5 years agoSupport larger BUFLEN sizes by dynamically allocating buf.
Nathan Moinvaziri [Fri, 29 May 2020 16:10:13 +0000 (09:10 -0700)] 
Support larger BUFLEN sizes by dynamically allocating buf.

5 years agoAdded ZLIB_REGISTER to disable register keyword for C++.
Nathan Moinvaziri [Fri, 19 Jun 2020 04:09:30 +0000 (21:09 -0700)] 
Added ZLIB_REGISTER to disable register keyword for C++.

Co-authored-by: pps83 <pps83@users.noreply.github.com>
5 years agoDon't write end of last block when returning finish_started.
Nathan Moinvaziri [Sat, 27 Jun 2020 15:55:40 +0000 (08:55 -0700)] 
Don't write end of last block when returning finish_started.

5 years agoFixed avail_out == 0 conditional not returning need_more in deflate_quick.
Nathan Moinvaziri [Fri, 26 Jun 2020 05:52:59 +0000 (22:52 -0700)] 
Fixed avail_out == 0 conditional not returning need_more in deflate_quick.
Fixed ending block when returning need_more caused problems with inflate.

So instead of ending the block each time the function returns to finish the last block, we check upon start to see if it is the last block and if the last block has been started, and if not it will close the previous block and start the last block.

5 years agoRename from memchunk to chunkset.
Nathan Moinvaziri [Fri, 26 Jun 2020 18:00:15 +0000 (11:00 -0700)] 
Rename from memchunk to chunkset.

5 years agoRename add_intrinsics_option to set_intrinsics_option.
Nathan Moinvaziri [Fri, 26 Jun 2020 17:31:59 +0000 (10:31 -0700)] 
Rename add_intrinsics_option to set_intrinsics_option.

5 years agoClean up header includes for Win32 and ARM.
Nathan Moinvaziri [Fri, 26 Jun 2020 07:25:45 +0000 (00:25 -0700)] 
Clean up header includes for Win32 and ARM.
Fixed MSVC compiler warning in storechunk for ARM Neon.
Fixed arm_neon.h include for memchunk for ARM Neon.

5 years agoOnly calculate inflate chunk size once and store it for future use for performance.
Nathan Moinvaziri [Fri, 19 Jun 2020 03:22:09 +0000 (20:22 -0700)] 
Only calculate inflate chunk size once and store it for future use for performance.

5 years agoSplit memcopy by architecture.
Nathan Moinvaziri [Wed, 18 Mar 2020 01:03:15 +0000 (18:03 -0700)] 
Split memcopy by architecture.
Use uint8_t[8] struct on big-endian machines for speed.

5 years agoApply compiler flags only to source files that require them in CMake.
Nathan Moinvaziri [Sat, 14 Mar 2020 04:15:50 +0000 (22:15 -0600)] 
Apply compiler flags only to source files that require them in CMake.

5 years agoAdd POWER8_VSX_SLIDEHASH macro
Matheus Castanho [Mon, 22 Jun 2020 14:02:10 +0000 (11:02 -0300)] 
Add POWER8_VSX_SLIDEHASH macro

The slide_hash optimization for POWER currently depends on POWER8 macro
to be enabled. Switch this to use POWER8_VSX_SLIDEHASH instead to better
match the naming scheme used by other archs.

5 years agocmake: Use consistent arch names for POWER targets
Matheus Castanho [Tue, 9 Jun 2020 18:25:16 +0000 (15:25 -0300)] 
cmake: Use consistent arch names for POWER targets

The arch detection code used by cmake build exports ppc arch names in an
abbreviated way, e.g. ppc64le instead of powerpc64le. Some parts of
CMakeLists.txt are using the longer form instead, which will not
properly match the desired subarch as expected. Switch to using the
longer form everywhere for consistency with 'configure' script and with
arch names obtained when running under QEMU.

5 years agoDo not set s->prev_length in deflate_medium, it is previously set in lm_init already.
Nathan Moinvaziri [Wed, 10 Jun 2020 06:00:36 +0000 (23:00 -0700)] 
Do not set s->prev_length in deflate_medium, it is previously set in lm_init already.

5 years agoDon't set bflush to zero since it is assigned before used.
Nathan Moinvaziri [Wed, 10 Jun 2020 05:58:18 +0000 (22:58 -0700)] 
Don't set bflush to zero since it is assigned before used.

5 years agoDon't need to set s->match_length to zero in deflate_huff.
Nathan Moinvaziri [Fri, 5 Jun 2020 00:31:40 +0000 (17:31 -0700)] 
Don't need to set s->match_length to zero in deflate_huff.

5 years agoUse local variable to store match_len in deflate_rle.
Nathan Moinvaziri [Fri, 5 Jun 2020 00:30:50 +0000 (17:30 -0700)] 
Use local variable to store match_len in deflate_rle.

5 years agoOnly set current_match to literal if hash_head == 0.
Nathan Moinvaziri [Thu, 4 Jun 2020 19:57:24 +0000 (12:57 -0700)] 
Only set current_match to literal if hash_head == 0.

5 years agoFixed whitespace in deflate_quick.
Nathan Moinvaziri [Thu, 4 Jun 2020 18:20:38 +0000 (11:20 -0700)] 
Fixed whitespace in deflate_quick.

5 years agoUse local variable to store match_len in deflate_fast.
Nathan Moinvaziri [Thu, 4 Jun 2020 18:19:24 +0000 (11:19 -0700)] 
Use local variable to store match_len in deflate_fast.

5 years agoMove check for hash_head != 0 directly after quick_insert_string.
Nathan Moinvaziri [Thu, 4 Jun 2020 18:17:04 +0000 (11:17 -0700)] 
Move check for hash_head != 0 directly after quick_insert_string.

5 years agoSeparate defines on individual lines to prevent merge conflicts.
Nathan Moinvaziri [Sun, 14 Jun 2020 03:34:07 +0000 (20:34 -0700)] 
Separate defines on individual lines to prevent merge conflicts.

5 years agoAdd adler32_len_64 for length < 64
Matheus Castanho [Tue, 23 Jun 2020 12:49:26 +0000 (09:49 -0300)] 
Add adler32_len_64 for length < 64

Add adler32_len_64 to adler32_p.h to allow reuse by other adler32
implementations that may need it.

5 years agoMove DO* macro definitions to adler32_p.h
Matheus Castanho [Tue, 23 Jun 2020 12:36:38 +0000 (09:36 -0300)] 
Move DO* macro definitions to adler32_p.h

Add new generic definitions of DO* macros used by adler32 algorithms to
adler32_p.h to allow reuse by other adler32 implementations.

5 years agoAdd tests for Adler32
Rogerio Alves [Tue, 10 Dec 2019 18:04:28 +0000 (15:04 -0300)] 
Add tests for Adler32

5 years agoAdler32 vector optimization for Power.
Rogerio Alves [Mon, 9 Dec 2019 17:40:53 +0000 (14:40 -0300)] 
Adler32 vector optimization for Power.

This commit implements a Power (POWER8+) vector optimization for Adler32
checksum using VSX (vector) instructions. The VSX adler32 checksum is up
to 10x fast than the adler32 baseline code.

Author: Rogerio Alves <rcardoso@linux.ibm.com>

5 years agoDetermine whether platform supports dll declspec
Don [Tue, 9 Jun 2020 16:19:06 +0000 (09:19 -0700)] 
Determine whether platform supports dll declspec

Clang contains __has_declspec_attribute for MSVC compatibility. This can be
used to determine whether __declspec is available. Use this to determine if
dllimport/dllexport should be used when exporting the zlib API.

5 years agoFixed deflate_quick missing from Win32 ARM makefile.
Nathan Moinvaziri [Tue, 16 Jun 2020 17:36:32 +0000 (10:36 -0700)] 
Fixed deflate_quick missing from Win32 ARM makefile.

5 years agoFix storechunk for MSVC ARM.
Nathan Moinvaziri [Sun, 24 May 2020 19:17:32 +0000 (12:17 -0700)] 
Fix storechunk for MSVC ARM.

5 years agoFixed missing compare258 object compilation in Win32 ARM makefiles.
Nathan Moinvaziri [Sun, 24 May 2020 16:02:26 +0000 (09:02 -0700)] 
Fixed missing compare258 object compilation in Win32 ARM makefiles.

5 years agoDon't explicitly enable neon flag on MSVC ARM64 builds.
Nathan Moinvaziri [Sat, 2 May 2020 18:06:03 +0000 (11:06 -0700)] 
Don't explicitly enable neon flag on MSVC ARM64 builds.

5 years agoRemoved old references to fill_window in NMake ARM makefiles.
Nathan Moinvaziri [Sat, 2 May 2020 17:14:36 +0000 (10:14 -0700)] 
Removed old references to fill_window in NMake ARM makefiles.

5 years agoAdded CI configurations for MSVC ARM and ARM64.
Nathan Moinvaziri [Thu, 30 Apr 2020 01:02:55 +0000 (18:02 -0700)] 
Added CI configurations for MSVC ARM and ARM64.

5 years agoEnable NEON-optimized slide_hash on aarch64 if NEON-optimizations are enabled.
Mika Lindqvist [Sun, 21 Jun 2020 14:00:04 +0000 (17:00 +0300)] 
Enable NEON-optimized slide_hash on aarch64 if NEON-optimizations are enabled.

5 years agoFixed casting warnings
Pavel P [Sat, 25 Apr 2020 11:24:12 +0000 (17:24 +0600)] 
Fixed casting warnings

5 years agoAdd cmake build dir to gitignore
Pavel P [Sat, 25 Apr 2020 11:33:06 +0000 (17:33 +0600)] 
Add cmake build dir to gitignore

+ ignore build.* or build-* top level dirs

5 years agoDo not use word xor (iso646 legacy)
Nathan Moinvaziri [Fri, 19 Jun 2020 04:12:32 +0000 (21:12 -0700)] 
Do not use word xor (iso646 legacy)

Co-authored-by: pps83 <pps83@users.noreply.github.com>
5 years agotest/pkgcheck.sh: verify cmake and configure install identical bits (excluding .a...
Dan Kegel [Thu, 18 Jun 2020 21:24:14 +0000 (14:24 -0700)] 
test/pkgcheck.sh: verify cmake and configure install identical bits (excluding .a and .so for now)

Also add workflow to run pkgcheck.sh on one system.

5 years agocmake: generate same zconf.h as configure
Dan Kegel [Thu, 11 Jun 2020 01:41:32 +0000 (18:41 -0700)] 
cmake: generate same zconf.h as configure

Also make comment in zconf.h less configure-specific

5 years agocmake: generate same .pc file contents as configure
Dan Kegel [Wed, 10 Jun 2020 23:35:44 +0000 (16:35 -0700)] 
cmake: generate same .pc file contents as configure

5 years agocmake: install .pc file to same location as configure
Dan Kegel [Wed, 10 Jun 2020 22:52:31 +0000 (15:52 -0700)] 
cmake: install .pc file to same location as configure

5 years agodeflate_slow: Suppress a static analysis warning triggered by recent refactoring...
Dan Kegel [Sat, 13 Jun 2020 23:33:59 +0000 (16:33 -0700)] 
deflate_slow: Suppress a static analysis warning triggered by recent refactoring c459b4f5.

5 years agoMove check to start block out of main loop for performance reasons.
Nathan Moinvaziri [Tue, 16 Jun 2020 20:35:27 +0000 (13:35 -0700)] 
Move check to start block out of main loop for performance reasons.

5 years agoFixed deflate_quick to not emit a block when there is no available input. Pigz requir...
Nathan Moinvaziri [Fri, 29 May 2020 15:25:43 +0000 (08:25 -0700)] 
Fixed deflate_quick to not emit a block when there is no available input. Pigz requires no blocks to be emitted in certain instances when calling deflate with Z_BLOCK.
Fixed end block not being emitted between calls to deflate_quick causing invalid stored block lengths in certain instances.

5 years agoUpdated features with new Adler32 implementations.
Nathan Moinvaziri [Sat, 13 Jun 2020 03:58:35 +0000 (20:58 -0700)] 
Updated features with new Adler32 implementations.

5 years agoRemove unnecessary adler32_neon.h.
Nathan Moinvaziri [Sat, 13 Jun 2020 03:28:58 +0000 (20:28 -0700)] 
Remove unnecessary adler32_neon.h.

5 years agoAdded regression test for deflateEnd returning -3 when using deflate quick. #382
Nathan Moinvaziri [Sat, 26 Oct 2019 20:03:25 +0000 (13:03 -0700)] 
Added regression test for deflateEnd returning -3 when using deflate quick. #382

5 years agoMakefile: fail minigzip test if minigzip aborts
Dan Kegel [Wed, 10 Jun 2020 15:41:07 +0000 (08:41 -0700)] 
Makefile: fail minigzip test if minigzip aborts

Pipeline exit status ignores all but the last
process in the pipeline, so break up the pipeline
so we can see minigzip's exit status.

Also fix ancient quoting bug; intention was likely to use
shell $$ variable to uniquify temp file name.

5 years agominigzip.c: bring back default bahavior, use distinguishable error code on bad cmdline
Dan Kegel [Wed, 10 Jun 2020 15:40:34 +0000 (08:40 -0700)] 
minigzip.c: bring back default bahavior, use distinguishable error code on bad cmdline

Fixes #635

5 years agoRemove Borland C++ compiler references
Don [Tue, 9 Jun 2020 16:57:05 +0000 (09:57 -0700)] 
Remove Borland C++ compiler references

There are a few guards checking for Borland C++ 5.0 or greater which was released
in 1996. While there is still a descendent of this compiler in Embarcadero C++ Builder
its value for __BORLANDC__ is greater than 0x500 so it is safe to remove these guards.

5 years agoinfcover.c: assert that we avoid zero-length allocations; fixes #593
Dan Kegel [Sat, 13 Jun 2020 19:17:46 +0000 (19:17 +0000)] 
infcover.c: assert that we avoid zero-length allocations; fixes #593

5 years agoUse standard int types in zlib-ng api.
Nathan Moinvaziri [Sat, 23 May 2020 14:01:35 +0000 (07:01 -0700)] 
Use standard int types in zlib-ng api.

5 years agoFixed variable set but not used static analysis warning in example.
Nathan Moinvaziri [Tue, 9 Jun 2020 04:12:58 +0000 (21:12 -0700)] 
Fixed variable set but not used static analysis warning in example.

  example.c:84:14: warning: variable ‘read’ set but not used [-Wunused-but-set-variable]
     int err, read;
  example.c:198:5: warning: Value stored to 'read' is never read [deadcode.DeadStores]
    read = PREFIX(gzfread)(uncompr, uncomprLen, 1, file);

5 years agoFixed clang static analysis warning value stored is never read in infcover.
Nathan Moinvaziri [Tue, 9 Jun 2020 04:08:52 +0000 (21:08 -0700)] 
Fixed clang static analysis warning value stored is never read in infcover.

  infcover.c:466:5: warning: Value stored to 'buf' is never read [deadcode.DeadStores]
    buf += len;

5 years agoDisable unaligned access of > 4 bytes on 32-bit arm
NiLuJe [Thu, 4 Jun 2020 22:48:06 +0000 (00:48 +0200)] 
Disable unaligned access of > 4 bytes on 32-bit arm

5 years agoFixed defined WIN32 in switchlevels should be _WIN32.
Nathan Moinvaziri [Tue, 9 Jun 2020 01:56:25 +0000 (18:56 -0700)] 
Fixed defined WIN32 in switchlevels should be _WIN32.

5 years agoFixed deflate_quick algorithm not being used due to old check.
Nathan Moinvaziri [Tue, 9 Jun 2020 01:59:29 +0000 (18:59 -0700)] 
Fixed deflate_quick algorithm not being used due to old check.

5 years agoAdded new lines in Alder32 AVX2 and SSSE3 to improve readability.
Nathan Moinvaziri [Mon, 25 May 2020 13:32:55 +0000 (06:32 -0700)] 
Added new lines in Alder32 AVX2 and SSSE3 to improve readability.

5 years agoZero entire s1 and s2 for possibly better performance.
Nathan Moinvaziri [Mon, 25 May 2020 13:28:38 +0000 (06:28 -0700)] 
Zero entire s1 and s2 for possibly better performance.

5 years agoAdd UNLIKELY to first 3 branches in adler32 variants.
Nathan Moinvaziri [Sat, 23 May 2020 13:14:54 +0000 (06:14 -0700)] 
Add UNLIKELY to first 3 branches in adler32 variants.

5 years agoAdded Adler32 SSSE3 and AVX2 implementations to functable.
Nathan Moinvaziri [Sat, 23 May 2020 04:35:26 +0000 (21:35 -0700)] 
Added Adler32 SSSE3 and AVX2 implementations to functable.

Co-authored-by: Brian Bockelman <bockelman@gmail.com>
Co-authored-by: Mika T. Lindqvist <postmaster@raasu.org>
5 years agoRemove unnecessary commented-out printf statements.
Brian Bockelman [Thu, 17 Nov 2016 03:35:30 +0000 (21:35 -0600)] 
Remove unnecessary commented-out printf statements.

(cherry picked from commit e0284cc3ef470c433bc0831d71fba038c3251944)

5 years agoRewrite adler32 to have a SSE and AVX variant.
Brian Bockelman [Thu, 17 Nov 2016 03:32:48 +0000 (21:32 -0600)] 
Rewrite adler32 to have a SSE and AVX variant.

On a 2.3GHz Haswell, I get the following timings when doing
an adler32 call against 1907MB of data:

Adler32 base time: 970682 usec
Adler32 vectorized time: 403403 usec
Adler32 AVX time: 264453 usec

(cherry picked from commit 905c306d54ec37a9efd56b6561ce4ab843be3a1c)

5 years agoMove Tracev flush statement into flush_pending.
Nathan Moinvaziri [Tue, 2 Jun 2020 16:24:50 +0000 (09:24 -0700)] 
Move Tracev flush statement into flush_pending.

5 years agoMove Tracevv statements when emitting literal to zng_tr_tally_lit.
Nathan Moinvaziri [Tue, 2 Jun 2020 16:23:47 +0000 (09:23 -0700)] 
Move Tracevv statements when emitting literal to zng_tr_tally_lit.

5 years agoMove check for match length in deflate_quick to check_match.
Nathan Moinvaziri [Tue, 2 Jun 2020 16:17:56 +0000 (09:17 -0700)] 
Move check for match length in deflate_quick to check_match.

5 years agoFixed whitespace formatting in bi_flush.
Nathan Moinvaziri [Tue, 2 Jun 2020 16:26:13 +0000 (09:26 -0700)] 
Fixed whitespace formatting in bi_flush.

5 years agoRemoved example64 and minigzip64 since large file support is now natively supported.
Nathan Moinvaziri [Fri, 29 May 2020 01:52:39 +0000 (18:52 -0700)] 
Removed example64 and minigzip64 since large file support is now natively supported.

5 years agoFor gzseek, gzoffset, gzopen, adler32_combine, crc32_combine and crc32_combine_gen...
Nathan Moinvaziri [Thu, 28 May 2020 01:16:50 +0000 (18:16 -0700)] 
For gzseek, gzoffset, gzopen, adler32_combine, crc32_combine and crc32_combine_gen, export 32-bit and 64-bit versions for zlib-compatible api and only 64-bit version (without 64 suffix) for zlib-ng native api.

5 years agoFixed wrong 64-bit casting in deflatePrime potentially causing bits to be lost.
Nathan Moinvaziri [Sat, 30 May 2020 17:50:38 +0000 (10:50 -0700)] 
Fixed wrong 64-bit casting in deflatePrime potentially causing bits to be lost.

    Arithmetic overflow: Using operator '<<' on a 4 byte value and then casting the result to a 8 byte value.
       Cast the value to the wider type before calling operator '<<' to avoid overflow (io.2).
    Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value.
       Results might not be an expected value.

5 years agoCast distance code to uint64_t before shifting in zng_emit_dist.
Nathan Moinvaziri [Tue, 2 Jun 2020 16:02:07 +0000 (09:02 -0700)] 
Cast distance code to uint64_t before shifting in zng_emit_dist.

5 years agoFixed arithmetic overflow when emitting deflate header bits.
Nathan Moinvaziri [Mon, 1 Jun 2020 04:46:03 +0000 (21:46 -0700)] 
Fixed arithmetic overflow when emitting deflate header bits.

    Arithmetic overflow: 32-bit value is shifted, then cast to 64-bit value.
      Results might not be an expected value.

5 years agoClean up windows defines, use _WIN32
Pavel P [Mon, 20 Apr 2020 10:19:30 +0000 (16:19 +0600)] 
Clean up windows defines, use _WIN32

 + replaced WIN32 with _WIN32
 + removed unused WINDOWS/_WINDOWS defines
 + no need to test for __MINGW__, as _WIN32 is also defined

5 years agoFix specification of warnings for intel compilers
Gabriel A. Devenyi [Fri, 29 May 2020 17:11:32 +0000 (13:11 -0400)] 
Fix specification of warnings for intel compilers

5 years agoMake deflate_quick algorithm available to all architectures. #205
Nathan Moinvaziri [Sun, 24 May 2020 15:42:38 +0000 (08:42 -0700)] 
Make deflate_quick algorithm available to all architectures. #205

5 years agoAdded GitHub Actions workflow to test against libpng.
Nathan Moinvaziri [Sat, 6 Jun 2020 16:44:58 +0000 (09:44 -0700)] 
Added GitHub Actions workflow to test against libpng.

5 years agoAdd a workflow for clang and gcc static analysis
Gabriel A. Devenyi [Mon, 25 May 2020 03:53:57 +0000 (23:53 -0400)] 
Add a workflow for clang and gcc static analysis

5 years agoRun compression level tests without open mode.
Nathan Moinvaziri [Fri, 29 May 2020 20:58:11 +0000 (13:58 -0700)] 
Run compression level tests without open mode.
Remove duplicate minigzip cmake tests.

5 years agoAdded help message to switchlevels.
Nathan Moinvaziri [Thu, 4 Jun 2020 17:58:37 +0000 (10:58 -0700)] 
Added help message to switchlevels.

5 years agoAdded help message to minigzip.
Nathan Moinvaziri [Thu, 4 Jun 2020 17:58:26 +0000 (10:58 -0700)] 
Added help message to minigzip.

5 years agoAdd optimized slide_hash for POWER processors
Matheus Castanho [Wed, 27 May 2020 13:06:09 +0000 (10:06 -0300)] 
Add optimized slide_hash for POWER processors

This commit introduces a new slide_hash function that
uses VSX vector instructions to slide 8 hash elements at a time,
instead of just one as the standard code does.