]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
4 years agoReorganize inflate window layout
Jim Kukunas [Wed, 30 Jun 2021 23:36:08 +0000 (19:36 -0400)] 
Reorganize inflate window layout

This commit significantly improves inflate performance by reorganizing the window buffer into a contiguous window and pending output buffer. The goal of this layout is to reduce branching, improve cache locality, and enable for the use of crc folding with gzip input.

The window buffer is allocated as a multiple of the user-selected window size. In this commit, a factor of 2 is utilized.

The layout of the window buffer is divided into two sections. The first section, window offset [0, wsize), is reserved for history that has already been output. The second section, window offset [wsize, 2 * wsize), is reserved for buffering pending output that hasn't been flushed to the user's output buffer yet.

The history section grows downwards, towards the window offset of 0. The pending output section grows upwards, towards the end of the buffer. As a result, all of the possible distance/length data that may need to be copied is contiguous. This removes the need to stitch together output from 2 separate buffers.

In the case of gzip input, crc folding is used to copy the pending output to the user's buffers.

Co-authored-by: Nathan Moinvaziri <nathan@nathanm.com>
4 years agoFixed minideflate write buffers being overwritten.
Nathan Moinvaziri [Fri, 12 Nov 2021 01:55:13 +0000 (17:55 -0800)] 
Fixed minideflate write buffers being overwritten.

4 years ago[ARM] Try to compile test for float-abi detection code.
Mika Lindqvist [Fri, 29 Oct 2021 17:08:30 +0000 (20:08 +0300)] 
[ARM] Try to compile test for float-abi detection code.

4 years ago[MacOS] Downgrade to XCode 11.7.0 for pkgcheck.
Mika Lindqvist [Fri, 29 Oct 2021 17:57:31 +0000 (20:57 +0300)] 
[MacOS] Downgrade to XCode 11.7.0 for pkgcheck.

4 years agoIBM Z: Run DFLTCC tests on the self-hosted builder
Ilya Leoshkevich [Wed, 4 Aug 2021 22:27:31 +0000 (00:27 +0200)] 
IBM Z: Run DFLTCC tests on the self-hosted builder

* Use the self-hosted builder instead of ubuntu-latest.
* Drop qemu-related settings from DFLTCC configurations.
* Install codecov only for the current user, since the self-hosted
  builder runs under a restricted non-root account.
* Use actions/checkout@v2 for configure checks, since for some reason
  actions/checkout@v1 cannot find git on the self-hosted builder.
* Update the testing section of the DFLTCC README.
* Add the infrastructure code for the self-hosted builder.

4 years agoENH: Transition to Ubuntu 18.04 in `GitHub` actions workflows
Jon Haitz Legarreta Gorroño [Wed, 13 Oct 2021 13:58:41 +0000 (09:58 -0400)] 
ENH: Transition to Ubuntu 18.04 in `GitHub` actions workflows

Transition to Ubuntu 18.04 in `GitHub` actions workflows.

Fixes:
```
Ubuntu 16.04 Clang
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.

Ubuntu 16.04 GCC
This request was automatically failed because there were no enabled runners online to process the request for more than 1 days.
```

reported for example at:
https://github.com/zlib-ng/zlib-ng/actions/runs/1326434358

Official `GitHub` notice related to the removal of the 16.04 virtual
environments:
https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/

4 years agoFix minor formatting issues
Dženan Zukić [Mon, 6 Sep 2021 18:38:09 +0000 (14:38 -0400)] 
Fix minor formatting issues

From ITK PR: https://github.com/InsightSoftwareConsortium/ITK/pull/2803
CI check: https://github.com/InsightSoftwareConsortium/ITK/runs/3864083025

commit 5434d42 adds bad whitespace:
README.md:223: new blank line at EOF.

commit 5434d42 is not allowed; missing newline at the end of file in .gitattributes.

4 years agoCOMP: Fix data loss warning
Jon Haitz Legarreta Gorroño [Sun, 10 Oct 2021 14:51:09 +0000 (10:51 -0400)] 
COMP: Fix data loss warning

Fix data loss warning.

Fixes:
```
itkzlib-ng/inflate.c(1209,24): warning C4267: '=': conversion from 'size_t' to 'unsigned long', possible loss of data
itkzlib-ng/inflate.c(1210,26): warning C4267: '=': conversion from 'size_t' to 'unsigned long', possible loss of data
```

4 years agoMake integration into bigger projects easier
Dženan Zukić [Mon, 6 Sep 2021 18:26:56 +0000 (14:26 -0400)] 
Make integration into bigger projects easier

4 years agoIBM Z: Adjust compressBound() for DFLTCC
Ilya Leoshkevich [Mon, 11 Oct 2021 10:24:20 +0000 (12:24 +0200)] 
IBM Z: Adjust compressBound() for DFLTCC

When DFLTCC was introduced, deflateBound() was adjusted, but
compressBound() was not, leading to compression failures when using
compressBound() + compress() with poorly compressible data.

4 years agoIBM Z: Sync crc_fold with DFLTCC
Ilya Leoshkevich [Mon, 11 Oct 2021 11:22:13 +0000 (13:22 +0200)] 
IBM Z: Sync crc_fold with DFLTCC

Intermediate CRC32 value was moved from strm->adler to
state->crc_fold.

4 years agoIBM Z: Do not check inflateGetDictionary() with DFLTCC
Ilya Leoshkevich [Mon, 11 Oct 2021 11:47:20 +0000 (13:47 +0200)] 
IBM Z: Do not check inflateGetDictionary() with DFLTCC

The zlib manual does not specify a strict contract for
inflateGetDictionary(), it merely says that it "Returns the sliding
dictionary being maintained by inflate", which is an implementation
detail. IBM Z inflate's behavior differs from that of software, and
may change in the future to boot.

4 years agoLink crc32_test and infcover with $(CFLAGS)
Ilya Leoshkevich [Mon, 11 Oct 2021 10:36:28 +0000 (12:36 +0200)] 
Link crc32_test and infcover with $(CFLAGS)

This fixes link failures when using CFLAGS=-m31 on IBM Z. All the
other tests are already linked this way.

4 years agoIBM Z: Fix building outside of a source directory
Ilya Leoshkevich [Mon, 11 Oct 2021 11:12:42 +0000 (13:12 +0200)] 
IBM Z: Fix building outside of a source directory

Do not use relative includes, since they are valid only within the
source directory. Rely on the build system to pass the necessary
include flags instead.

4 years agoExercise the new symbol prefix option in CI tests
Dženan Zukić [Wed, 22 Sep 2021 21:08:06 +0000 (17:08 -0400)] 
Exercise the new symbol prefix option in CI tests

4 years agoAdd support for name mangling
Dženan Zukić [Mon, 6 Sep 2021 20:39:28 +0000 (16:39 -0400)] 
Add support for name mangling

This is useful when zlib-ng is embedded into another library,
such as ITK: https://itk.org/

Closes #1025.

Co-authored-by: Mika Lindqvist <postmaster@raasu.org>
4 years agoUse helper function for printing error and exiting in example.
Nathan Moinvaziri [Mon, 12 Jul 2021 03:31:08 +0000 (20:31 -0700)] 
Use helper function for printing error and exiting in example.

4 years agoAdded code coverage for inflateGetDictionary in example.
Nathan Moinvaziri [Sun, 11 Jul 2021 23:17:30 +0000 (16:17 -0700)] 
Added code coverage for inflateGetDictionary in example.

4 years agoCall deflateBound to calculate length with custom gzip header in example.
Nathan Moinvaziri [Sun, 11 Jul 2021 23:58:48 +0000 (16:58 -0700)] 
Call deflateBound to calculate length with custom gzip header in example.

4 years agoFill out gzheader before calling deflateSetHeader for better code coverage in example.
Nathan Moinvaziri [Sun, 11 Jul 2021 23:59:21 +0000 (16:59 -0700)] 
Fill out gzheader before calling deflateSetHeader for better code coverage in example.

4 years agoAdded CI instances for CTZLL and CTZ builtin existence to improve code coverage.
Nathan Moinvaziri [Sat, 10 Jul 2021 17:08:53 +0000 (10:08 -0700)] 
Added CI instances for CTZLL and CTZ builtin existence to improve code coverage.

4 years agoFix UB in inffast.c when not using window
Ori Livneh [Mon, 23 Aug 2021 16:40:19 +0000 (12:40 -0400)] 
Fix UB in inffast.c when not using window

When not using window, `window + wsize` applies a zero offset to a null pointer, which is undefined behavior.

4 years agoFixed trailing whitespaces and missing new lines.
Nathan Moinvaziri [Sat, 4 Sep 2021 19:16:16 +0000 (12:16 -0700)] 
Fixed trailing whitespaces and missing new lines.

4 years agoFix hangs on macOS due to loading of misaligned addresses in chunkmemset_8.
Sergey Markelov [Thu, 22 Jul 2021 17:23:26 +0000 (10:23 -0700)] 
Fix hangs on macOS due to loading of misaligned addresses in chunkmemset_8.

4 years agoInclude win directory in pigz even if not using threads.
Nathan Moinvaziri [Thu, 1 Jul 2021 21:06:06 +0000 (14:06 -0700)] 
Include win directory in pigz even if not using threads.

4 years agoFixed undefined behavior of isgraph when character is not in the range 0 through...
Nathan Moinvaziri [Tue, 17 Aug 2021 17:12:37 +0000 (10:12 -0700)] 
Fixed undefined behavior of isgraph when character is not in the range 0 through 0xFF inclusive.

4 years agoUse static inline functions for crc32 folding load/save.
Nathan Moinvaziri [Sat, 3 Jul 2021 19:40:55 +0000 (12:40 -0700)] 
Use static inline functions for crc32 folding load/save.

4 years agoMove crc32 folding functions into functable.
Nathan Moinvaziri [Sat, 3 Jul 2021 00:44:08 +0000 (17:44 -0700)] 
Move crc32 folding functions into functable.

4 years agoAdded CRC32_INITIAL_VALUE to prevent initial call to crc32 function.
Nathan Moinvaziri [Fri, 2 Jul 2021 23:56:20 +0000 (16:56 -0700)] 
Added CRC32_INITIAL_VALUE to prevent initial call to crc32 function.

4 years agoAdd new crc32 unit test
Matheus Castanho [Wed, 16 Jun 2021 17:36:24 +0000 (14:36 -0300)] 
Add new crc32 unit test

4 years agoAdd optimized crc32 for POWER8 and later processors
Matheus Castanho [Wed, 16 Jun 2021 17:36:24 +0000 (14:36 -0300)] 
Add optimized crc32 for POWER8 and later processors

This commit adds an optimized version of the crc32 function based
on crc32-vpmsum from https://github.com/antonblanchard/crc32-vpmsum/ .
The code has been relicensed to the zlib license.

This is the C implementation created by Rogerio Alves <rogealve@br.ibm.com>

It makes use of vector instructions to speed up CRC32 algorithm. Decompression
times were improved by +30% on tests.

Based on Daniel Black's work for the original zlib (madler/zlib#478).

4 years agoStandardize crc32_stub
Matheus Castanho [Wed, 16 Jun 2021 17:36:24 +0000 (14:36 -0300)] 
Standardize crc32_stub

Reorganize statements inside crc32_stub() to match more closely the format
used for other function stubs in functable.c.

4 years ago[arm] Disable ACLE, UNALIGNED_OK and UNALIGNED64_OK on armv7 and earlier.
Mika Lindqvist [Wed, 21 Jul 2021 16:26:43 +0000 (19:26 +0300)] 
[arm] Disable ACLE, UNALIGNED_OK and UNALIGNED64_OK on armv7 and earlier.
* armv7 has partial support for unaligned reads, but compiler might use instructions that do not support unaligned accesses

4 years ago[PowerPC] Use templatized code for slide_hash as code for VMX and VSX is very similar
Mika Lindqvist [Tue, 22 Jun 2021 19:19:13 +0000 (22:19 +0300)] 
[PowerPC] Use templatized code for slide_hash as code for VMX and VSX is very similar
* Any differences can be handled using compiler options or added as macros before including template header

4 years agoAdd AltiVec (VMX) to supported intrinsics for adler32 and slide_hash.
Mika Lindqvist [Sun, 13 Jun 2021 17:53:16 +0000 (20:53 +0300)] 
Add AltiVec (VMX) to supported intrinsics for adler32 and slide_hash.

4 years agoAdd PowerPC without Power8 optimizations to GitHub Actions' configure and cmake workf...
Mika Lindqvist [Sun, 13 Jun 2021 17:24:09 +0000 (20:24 +0300)] 
Add PowerPC without Power8 optimizations to GitHub Actions' configure and cmake workflows.

4 years agoPowerPC: Add initial support for AltiVec.
Mika Lindqvist [Sun, 26 Mar 2017 19:54:17 +0000 (22:54 +0300)] 
PowerPC: Add initial support for AltiVec.
* Add detection of VMX instructions

4 years agoFix Z_SOLO mode
Bernhard Rosenkränzer [Sun, 27 Jun 2021 12:31:54 +0000 (14:31 +0200)] 
Fix Z_SOLO mode

Without this patch, #include <zlib.h> with Z_SOLO defined
(e.g. while building perl 5.34.0) fails because of use of
undefined types.

4 years agoRename slide source files to slide_hash to match function name.
Nathan Moinvaziri [Tue, 15 Jun 2021 03:07:41 +0000 (20:07 -0700)] 
Rename slide source files to slide_hash to match function name.

4 years agoSeparate slide_hash_c in the same way that insert_string_c is separated from deflate.c.
Nathan Moinvaziri [Tue, 15 Jun 2021 02:55:09 +0000 (19:55 -0700)] 
Separate slide_hash_c in the same way that insert_string_c is separated from deflate.c.

4 years agoAdded build system check for posix_memalign support.
Nathan Moinvaziri [Sat, 26 Jun 2021 00:23:34 +0000 (17:23 -0700)] 
Added build system check for posix_memalign support.

Co-authored-by: concatime <concatime@users.noreply@github.com>
Co-authored-by: Mika Lindqvist <postmaster@raasu.org>
4 years agoUse STDC11 defined earlier in zbuild.h for Z_TLS check.
Nathan Moinvaziri [Sat, 26 Jun 2021 00:23:56 +0000 (17:23 -0700)] 
Use STDC11 defined earlier in zbuild.h for Z_TLS check.

4 years agoIBM Z: Add vectorized CRC32 implementation
Ilya Leoshkevich [Tue, 6 Apr 2021 11:51:16 +0000 (13:51 +0200)] 
IBM Z: Add vectorized CRC32 implementation

While DFLTCC takes care of accelerating compression on level 1, other
levels can be sped up too by computing CRC32 using various vector
instructions.

Take the Linux kernel assembly code that does that - its original
author (Hendrik Brueckner) works for IBM at the time of writing and has
allowed reusing the code under the zlib license. Rewrite it in C for
better maintainability, but keep the original structure, variable names
and comments.

Update the documentation.

Add CI configurations.

4 years agoRemove extra division operation in chunkcopy.
Nathan Moinvaziri [Fri, 11 Jun 2021 01:03:08 +0000 (18:03 -0700)] 
Remove extra division operation in chunkcopy.

4 years agoRemove deflate_state dependency from crc_folding.
Nathan Moinvaziri [Sun, 20 Jun 2021 00:24:00 +0000 (17:24 -0700)] 
Remove deflate_state dependency from crc_folding.

4 years agoFixed missing enclosing parentheses for ZSWAP64 in zutil.h to avoid erroneous result...
cenobit [Sat, 26 Jun 2021 02:57:00 +0000 (19:57 -0700)] 
Fixed missing enclosing parentheses for ZSWAP64 in zutil.h to avoid erroneous result in inffast.c.

4 years agoDon't define HASH_SIZE if it is already defined.
Nathan Moinvaziri [Sat, 26 Jun 2021 04:44:22 +0000 (21:44 -0700)] 
Don't define HASH_SIZE if it is already defined.

4 years agoAdded reduced memory cmake CI job.
Nathan Moinvaziri [Fri, 25 Jun 2021 19:53:39 +0000 (12:53 -0700)] 
Added reduced memory cmake CI job.

4 years agoTurn off reduced memory cmake option by default.
Nathan Moinvaziri [Fri, 25 Jun 2021 19:52:14 +0000 (12:52 -0700)] 
Turn off reduced memory cmake option by default.

4 years ago[Power8] Add chunk*_power8.
Mika Lindqvist [Sat, 19 Jun 2021 05:58:09 +0000 (08:58 +0300)] 
[Power8] Add chunk*_power8.

4 years agoAdded reduced memory configuration option to CMake and configure.
Nathan Moinvaziri [Thu, 18 Mar 2021 06:00:44 +0000 (23:00 -0700)] 
Added reduced memory configuration option to CMake and configure.

4 years agoSwitch longest_match in deflate_slow based on whether or not rolling hash is being...
Nathan Moinvaziri [Wed, 23 Jun 2021 00:22:52 +0000 (17:22 -0700)] 
Switch longest_match in deflate_slow based on whether or not rolling hash is being used.

Co-authored-by: Hans Kristian Rosbach <hk-git@circlestorm.org>
4 years agoUse UNLIKELY for branches related to rolling hash based on performance profiling.
Hans Kristian Rosbach [Tue, 22 Jun 2021 03:43:51 +0000 (20:43 -0700)] 
Use UNLIKELY for branches related to rolling hash based on performance profiling.

Co-authored-by: Nathan Moinvaziri <nathan@nathanm.com>
4 years agoUse longest_match_slow in deflate_slow.
Nathan Moinvaziri [Tue, 22 Jun 2021 03:39:47 +0000 (20:39 -0700)] 
Use longest_match_slow in deflate_slow.

4 years agoSeparate fast-zlib matching algorithm into its own longest_match variant.
Nathan Moinvaziri [Tue, 22 Jun 2021 03:38:51 +0000 (20:38 -0700)] 
Separate fast-zlib matching algorithm into its own longest_match variant.

4 years agoMinor prev_length calculation improvement in deflate_slow.
Nathan Moinvaziri [Tue, 15 Jun 2021 00:42:24 +0000 (17:42 -0700)] 
Minor prev_length calculation improvement in deflate_slow.

4 years agoEnable rolling hash function switching for fast-zlib.
Nathan Moinvaziri [Tue, 15 Jun 2021 00:41:37 +0000 (17:41 -0700)] 
Enable rolling hash function switching for fast-zlib.

4 years agoIncorporate fast-zlib algorithm changes into longest_match.
Nathan Moinvaziri [Tue, 15 Jun 2021 00:40:03 +0000 (17:40 -0700)] 
Incorporate fast-zlib algorithm changes into longest_match.

4 years agoUse STD_MIN_MATCH instead of WANT_MIN_MATCH in deflate_slow for fast-zlib.
Nathan Moinvaziri [Sun, 13 Jun 2021 21:59:32 +0000 (14:59 -0700)] 
Use STD_MIN_MATCH instead of WANT_MIN_MATCH in deflate_slow for fast-zlib.

4 years agoSetup hash functions to be switched based on compression level.
Nathan Moinvaziri [Tue, 15 Jun 2021 00:36:55 +0000 (17:36 -0700)] 
Setup hash functions to be switched based on compression level.

4 years agoAdded update_hash to build hash incrementally.
Nathan Moinvaziri [Tue, 15 Jun 2021 00:27:37 +0000 (17:27 -0700)] 
Added update_hash to build hash incrementally.

4 years agoAdded rolling hash functions for hash table.
Nathan Moinvaziri [Fri, 11 Jun 2021 00:25:27 +0000 (17:25 -0700)] 
Added rolling hash functions for hash table.

4 years ago[functable] Add missing call to cpu_check_features().
Mika Lindqvist [Mon, 21 Jun 2021 22:41:16 +0000 (01:41 +0300)] 
[functable] Add missing call to cpu_check_features().

4 years agoCast calculation of safe length to unsigned int to avoid compiler warnings.
Mika Lindqvist [Mon, 21 Jun 2021 06:07:59 +0000 (09:07 +0300)] 
Cast calculation of safe length to unsigned int to avoid compiler warnings.

4 years agoMinor optimization of inftrees.c based on profiling
Hans Kristian Rosbach [Thu, 17 Jun 2021 20:47:57 +0000 (22:47 +0200)] 
Minor optimization of inftrees.c based on profiling

4 years agoSeparate option and add_feature_info in cases where intrinsics are not available...
Nathan Moinvaziri [Sun, 13 Jun 2021 22:39:58 +0000 (15:39 -0700)] 
Separate option and add_feature_info in cases where intrinsics are not available we can report feature is disabled.

4 years ago[chunkcopy_safe] Don't call chunkcopy().
Mika Lindqvist [Fri, 18 Jun 2021 23:08:20 +0000 (02:08 +0300)] 
[chunkcopy_safe] Don't call chunkcopy().
* chunkcopy() can read or write more than the safe length if the length is not multiple of chunk size.

4 years ago[chunkset_neon] Use vdupq_n_u64.
Mika Lindqvist [Fri, 18 Jun 2021 21:10:44 +0000 (00:10 +0300)] 
[chunkset_neon] Use vdupq_n_u64.
* Using vdupq_n_u64 duplicates the unsigned 64-bit integer to two consecutive aligned memory locations in stack so compiler can use wider load instructions.
  All different-sized general-purpose registers overlay on ARM/AArch64, so any vector cast is no-op in assembly.

4 years ago[chunkset_neon] Don't use signed vector types.
Mika Lindqvist [Fri, 18 Jun 2021 20:15:28 +0000 (23:15 +0300)] 
[chunkset_neon] Don't use signed vector types.
* There is no need to convert between unsigned and signed vector types. All relevant intrinsics have versions for all unsigned vector types.

4 years agoFix MSVC warnings in hash_head_0.c test
Ilya Leoshkevich [Mon, 14 Jun 2021 19:03:51 +0000 (21:03 +0200)] 
Fix MSVC warnings in hash_head_0.c test

4 years agoAdd support for Thread Local Storage to ensure consistency in functable.
Hans Kristian Rosbach [Sun, 13 Jun 2021 11:57:45 +0000 (13:57 +0200)] 
Add support for Thread Local Storage to ensure consistency in functable.

4 years agoChange requested compiler standard to C11
Hans Kristian Rosbach [Sun, 13 Jun 2021 11:38:32 +0000 (13:38 +0200)] 
Change requested compiler standard to C11

4 years agoAdded aarch64 to pigz GitHub actions workflow.
Nathan Moinvaziri [Wed, 16 Jun 2021 15:11:33 +0000 (08:11 -0700)] 
Added aarch64 to pigz GitHub actions workflow.

4 years agoReduce number of branches in partial chunk copy based on chunk size.
Nathan Moinvaziri [Sun, 13 Jun 2021 22:57:28 +0000 (15:57 -0700)] 
Reduce number of branches in partial chunk copy based on chunk size.

4 years agoFixed indentation in CMakeLists.txt after PR #906.
Nathan Moinvaziri [Sun, 13 Jun 2021 22:36:47 +0000 (15:36 -0700)] 
Fixed indentation in CMakeLists.txt after PR #906.

4 years agoAdded Z_UNUSED define for ignore unused variables.
Nathan Moinvaziri [Sun, 13 Jun 2021 22:16:20 +0000 (15:16 -0700)] 
Added Z_UNUSED define for ignore unused variables.

4 years agoChange WITH_SANITIZER to be a multi-option parameter (for ccmake etc).
Hans Kristian Rosbach [Sun, 13 Jun 2021 13:11:23 +0000 (15:11 +0200)] 
Change WITH_SANITIZER to be a multi-option parameter (for ccmake etc).
Add support for selcting Thread sanitizer.

4 years agoAdded assert in chunkcopy to detect invalid length.
Nathan Moinvaziri [Fri, 11 Jun 2021 00:25:27 +0000 (17:25 -0700)] 
Added assert in chunkcopy to detect invalid length.

4 years agoCalculate from and out buffer advance only once in chunkcopy.
Nathan Moinvaziri [Fri, 4 Jun 2021 22:27:26 +0000 (15:27 -0700)] 
Calculate from and out buffer advance only once in chunkcopy.

4 years agoOnly need to add rem if it is greater than zero in chunkmemset.
Nathan Moinvaziri [Fri, 4 Jun 2021 22:24:23 +0000 (15:24 -0700)] 
Only need to add rem if it is greater than zero in chunkmemset.

4 years agoUse MIN and MAX macros.
Nathan Moinvaziri [Sat, 5 Jun 2021 02:46:33 +0000 (19:46 -0700)] 
Use MIN and MAX macros.

4 years agoInitialize s->prev_length to 0.
Hans Kristian Rosbach [Tue, 11 May 2021 11:56:35 +0000 (13:56 +0200)] 
Initialize s->prev_length to 0.

4 years agoRemove support for STD_MIN_MATCH != 3.
Hans Kristian Rosbach [Mon, 10 May 2021 16:29:40 +0000 (18:29 +0200)] 
Remove support for STD_MIN_MATCH != 3.
It has always been broken and untested anyways.

4 years agoMinor formatting changes related to MIN_MATCH/MAX_MATCH
Hans Kristian Rosbach [Mon, 10 May 2021 15:11:54 +0000 (17:11 +0200)] 
Minor formatting changes related to MIN_MATCH/MAX_MATCH

4 years agoSeparate MIN_MATCH into STD_MIN_MATCH and WANT_MIN_MATCH
Hans Kristian Rosbach [Mon, 10 May 2021 14:48:29 +0000 (16:48 +0200)] 
Separate MIN_MATCH into STD_MIN_MATCH and WANT_MIN_MATCH
Rename MAX_MATCH to STD_MAX_MATCH

4 years agoPrint architecture-specific static and shared object files in configure script simila...
Nathan Moinvaziri [Tue, 23 Mar 2021 01:33:50 +0000 (18:33 -0700)] 
Print architecture-specific static and shared object files in configure script similar to CMake.

4 years agoOnly run checks for intrinsics if optimizations are enabled.
Nathan Moinvaziri [Sat, 20 Mar 2021 21:10:14 +0000 (14:10 -0700)] 
Only run checks for intrinsics if optimizations are enabled.

4 years agoChange bi_reverse to use a bit-twiddling hack for 240x speed improvement.
Nathan Moinvaziri [Wed, 5 May 2021 22:32:40 +0000 (15:32 -0700)] 
Change bi_reverse to use a bit-twiddling hack for 240x speed improvement.

4 years agoMust use safe chunk copies due to inflateBack using the same allocation for output...
Nathan Moinvaziri [Fri, 11 Jun 2021 00:19:25 +0000 (17:19 -0700)] 
Must use safe chunk copies due to inflateBack using the same allocation for output and   window. In this instance if too many bytes are written it will not correctly write matches with distances close to the window size.

4 years agoReorder config table to avoid double negation, and to use the same
Hans Kristian Rosbach [Fri, 26 Mar 2021 16:06:28 +0000 (17:06 +0100)] 
Reorder config table to avoid double negation, and to use the same
logical ordering as the other ifdef.

4 years agoRebalance levels 1-4.
Hans Kristian Rosbach [Fri, 26 Mar 2021 15:21:23 +0000 (16:21 +0100)] 
Rebalance levels 1-4.
- Deflate_quick (level 1), no longer limit window, improves compression.
- Deflate_medium, don't check next position for levels below 5.
- Use deflate_medium instead of deflate_fast for level 3.
- Tweak level 4 to give a more predictable speed/compression tradeoff curve.

4 years agoIncrease size of gzip output buffer to be a multiple of the size of deflate's pending...
Nathan Moinvaziri [Tue, 9 Mar 2021 18:18:24 +0000 (10:18 -0800)] 
Increase size of gzip output buffer to be a multiple of the size of deflate's pending buffer for improved performance and fewer calls to deflate.

4 years agoClean up deflate_stored and deflate_rle by using MIN() where applicable.
Nathan Moinvaziri [Sat, 29 May 2021 01:15:50 +0000 (18:15 -0700)] 
Clean up deflate_stored and deflate_rle by using MIN() where applicable.

4 years agoSeparate huff, rle, and stored deflate strategies into their own source files.
Nathan Moinvaziri [Fri, 28 May 2021 03:43:41 +0000 (20:43 -0700)] 
Separate huff, rle, and stored deflate strategies into their own source files.

4 years agoRemove extra check that always is false in compare256_c_static.
Nathan Moinvaziri [Sat, 20 Mar 2021 16:31:59 +0000 (09:31 -0700)] 
Remove extra check that always is false in compare256_c_static.

4 years agoMod adler and sum2 when calculating adler32 for short lengths.
Nathan Moinvaziri [Mon, 1 Mar 2021 02:17:04 +0000 (18:17 -0800)] 
Mod adler and sum2 when calculating adler32 for short lengths.

4 years agoSync use of adler32_len_16 among adler32 variants.
Nathan Moinvaziri [Tue, 23 Feb 2021 05:43:24 +0000 (21:43 -0800)] 
Sync use of adler32_len_16 among adler32 variants.

4 years agoRemove legacy backticks notation for $(...) in configure script.
Nathan Moinvaziri [Fri, 26 Feb 2021 02:36:36 +0000 (18:36 -0800)] 
Remove legacy backticks notation for $(...) in configure script.

4 years agoFixed iterating over ls output is fragile in configure script.
Nathan Moinvaziri [Fri, 26 Feb 2021 01:27:03 +0000 (17:27 -0800)] 
Fixed iterating over ls output is fragile in configure script.

4 years agoFixed malformed double quotes in shell script.
Nathan Moinvaziri [Fri, 26 Feb 2021 00:46:11 +0000 (16:46 -0800)] 
Fixed malformed double quotes in shell script.