]> git.ipfire.org Git - thirdparty/zlib-ng.git/log
thirdparty/zlib-ng.git
9 years agoDo not define __builtin_ctzl for Clang on MSVC 70/head
Joergen Ibsen [Mon, 13 Jun 2016 11:01:18 +0000 (13:01 +0200)] 
Do not define __builtin_ctzl for Clang on MSVC

Clang targeting MSVC and Clang/C2 provide __builtin_ctzl.

9 years agoOnly run tests requiring zlib-compat if zlib-ng was compiled with it.
Hans Kristian Rosbach [Thu, 28 Apr 2016 12:59:20 +0000 (14:59 +0200)] 
Only run tests requiring zlib-compat if zlib-ng was compiled with it.

This also reveals that minigzip without zlib-compat is vulnerable
to one or more of the tests.

9 years agoFix spelling in travis config
Hans Kristian Rosbach [Thu, 28 Apr 2016 12:23:33 +0000 (14:23 +0200)] 
Fix spelling in travis config

9 years agoMake travis test --without-optimizations and --without-new-strategies codepaths as...
Hans Kristian Rosbach [Thu, 28 Apr 2016 12:20:46 +0000 (14:20 +0200)] 
Make travis test --without-optimizations and --without-new-strategies codepaths as well.

9 years agoBoth travis builds using configure should do zlib-compat
Hans Kristian Rosbach [Thu, 28 Apr 2016 12:15:02 +0000 (14:15 +0200)] 
Both travis builds using configure should do zlib-compat

9 years agoTravis should compile and test the zlib-compat code as well
Hans Kristian Rosbach [Thu, 28 Apr 2016 12:12:41 +0000 (14:12 +0200)] 
Travis should compile and test the zlib-compat code as well

9 years agoFix the remaining warnings due to conflicting defines of ZLIB_INTERNAL
Hans Kristian Rosbach [Thu, 28 Apr 2016 12:06:46 +0000 (14:06 +0200)] 
Fix the remaining warnings due to conflicting defines of ZLIB_INTERNAL

9 years agoAdd test for CVE-2004-0797
Daniel Axtens [Wed, 29 Apr 2015 06:20:37 +0000 (16:20 +1000)] 
Add test for CVE-2004-0797

CVE-2004-0797[0] occured when an error was detected but no action
was taken --- that is, execution was allowed to continue.

One of the tests for CVE-2005-2096 actually hit the code path that
was fixed in the patch for CVE-2004-0797.

This occured because all the fuzzing was done on zlib 1.2.1, and
zlib 1.2.2 fixed this bug but not the 2005 CVEs. It was detected by
running the test cases against zlib 1.2.2.

The relevant bits of the zlib 1.2.2 patch are [1] and [2].

[0] http://www.kb.cert.org/vuls/id/238678
[1] https://github.com/madler/zlib/commit/7a6955760ba950eb82f57929f8f6c9847c65f0af?diff=unified#diff-154f1240658ec1e9f5c90024002d749aR437
[2] https://github.com/madler/zlib/commit/7a6955760ba950eb82f57929f8f6c9847c65f0af?diff=unified#diff-327188edf18799ffbb5a51cc69f797e8R864

Signed-off-by: Daniel Axtens <dja@axtens.net>
9 years agoAdd test cases for CVE-2005-1849 and CVE-2005-2096
Daniel Axtens [Wed, 29 Apr 2015 04:56:57 +0000 (14:56 +1000)] 
Add test cases for CVE-2005-1849 and CVE-2005-2096

CVE-2005-1849[0] is an overflow of a fixed size buffer defined in
inftrees.h

CVE-2005-2096[1] is an overflow caused by insufficient input
validation of code trees[2].

This makes sure we don't accidentally reintroduce them.

zlib-1.2.1 was download and fuzz tested using AFL[3].  The crashing
cases were discovered. A patch for 1849 was then applied, and used to
determine which cases hit only that bug, and which ones hit 2096.

[0] http://seclists.org/bugtraq/2005/Jul/451
[1] http://seclists.org/bugtraq/2005/Jul/53
[2] https://bug299445.bugzilla.mozilla.org/attachment.cgi?id=188021
[3] http://lcamtuf.coredump.cx/afl/

Signed-off-by: Daniel Axtens <dja@axtens.net>
9 years agoAdd test for CVE-2002-0059
Daniel Axtens [Mon, 27 Apr 2015 06:17:21 +0000 (16:17 +1000)] 
Add test for CVE-2002-0059

CVE-2002-0059 was a double free in inflation. [0]

This makes sure we don't accidentally reintroduce it.

zlib-1.1.3 was download and fuzz tested using AFL[1].
This crashing case (test.gz) was discovered, and using gdb it was
confirmed to be a double free in the expected place.

The test script looks for a normal error exit (status code 1),
and fails if any other code is returned.

[0] http://www.cvedetails.com/cve/CVE-2002-0059/
[1] http://lcamtuf.coredump.cx/afl/

Signed-off-by: Daniel Axtens <dja@axtens.net>
9 years agoAdd test for CVE-2003-0107
Daniel Axtens [Mon, 27 Apr 2015 05:49:43 +0000 (15:49 +1000)] 
Add test for CVE-2003-0107

CVE-2003-0107[0] was a bug where zlib 1.1.4 failed to validate whether
arguments to gzprintf() fit within an internal buffer.

We should make sure that in refactoring we don't regress. Therefore,
build the sample code supplied in the original report [1], and check
if it crashes.

[0] http://www.cvedetails.com/cve/CVE-2003-0107/
[1] http://www.securityfocus.com/archive/1/312869

Signed-off-by: Daniel Axtens <dja@axtens.net>
9 years agoProperly bail out when a test fails.
Daniel Axtens [Wed, 29 Apr 2015 05:35:04 +0000 (15:35 +1000)] 
Properly bail out when a test fails.

At an earlier point in development, shared libs were failing on Travis
but the overall build was succeeding. Stop that from happening by
bailing out harder.

Signed-off-by: Daniel Axtens <dja@axtens.net>
9 years agoMove Makefile.in test-related parts into test/Makefile.in
Daniel Axtens [Wed, 29 Apr 2015 03:51:00 +0000 (13:51 +1000)] 
Move Makefile.in test-related parts into test/Makefile.in

Update configure to create test/Makefile.
Update /Makefile.in to call [dist]clean in test/

Signed-off-by: Daniel Axtens <dja@axtens.net>
9 years agoAdd support for internal attribute, the advantage of this over hidden
Hans Kristian Rosbach [Thu, 28 Apr 2016 09:04:15 +0000 (11:04 +0200)] 
Add support for internal attribute, the advantage of this over hidden
is for example that the compiler can safely assume that pointers to
functions declared internal can never be passed externally.
This allows the compiler to consider optimizations otherwise impossible.

9 years agoFix endianness-detection code on Solaris 11.
Evan Nemerson [Tue, 15 Mar 2016 03:48:46 +0000 (20:48 -0700)] 
Fix endianness-detection code on Solaris 11.

Solaris doesn't have sys/endian.h or endian.h, it has sys/byteorder.h,
which doesn't define BYTE_ORDER, it defines either _LITTLE_ENDIAN or
_BIG_ENDIAN.

9 years agoFix spelling of __DragonFly__ in crc32.c, found by @nemequ
Hans Kristian Rosbach [Thu, 28 Apr 2016 10:31:35 +0000 (12:31 +0200)] 
Fix spelling of __DragonFly__ in crc32.c, found by @nemequ

9 years agoMerge pull request #66 from mtl1979/mingw
Hans Kristian Rosbach [Thu, 28 Apr 2016 10:08:45 +0000 (12:08 +0200)] 
Merge pull request #66 from mtl1979/mingw

Fixes for MinGW w64 and MSYS2.

9 years agoMerge pull request #68 from mtl1979/import
Hans Kristian Rosbach [Thu, 28 Apr 2016 10:07:39 +0000 (12:07 +0200)] 
Merge pull request #68 from mtl1979/import

Loop on write() calls in gzwrite.c in case of non-blocking I/O.

9 years agoMerge pull request #67 from mtl1979/coverity
Hans Kristian Rosbach [Thu, 28 Apr 2016 10:07:06 +0000 (12:07 +0200)] 
Merge pull request #67 from mtl1979/coverity

Fix Coverity warnings.

9 years agoLoop on write() calls in gzwrite.c in case of non-blocking I/O. 68/head
Mark Adler [Tue, 5 Apr 2016 10:09:59 +0000 (03:09 -0700)] 
Loop on write() calls in gzwrite.c in case of non-blocking I/O.

9 years agoFix Coverity warnings. 67/head
Mika Lindqvist [Tue, 26 Apr 2016 10:04:50 +0000 (13:04 +0300)] 
Fix Coverity warnings.

9 years agoFix build under MSYS2. 66/head
Mika Lindqvist [Fri, 15 Apr 2016 10:28:19 +0000 (13:28 +0300)] 
Fix build under MSYS2.

9 years agoFix gzseek() problem on MinGW due to buggy _lseeki64 there.
Mark Adler [Sat, 30 Jan 2016 07:24:55 +0000 (23:24 -0800)] 
Fix gzseek() problem on MinGW due to buggy _lseeki64 there.

9 years agoMerge pull request #60 from mtl1979/cleanup
Hans Kristian Rosbach [Fri, 8 Jan 2016 15:04:00 +0000 (16:04 +0100)] 
Merge pull request #60 from mtl1979/cleanup

Cleanup

9 years agoUse size_t for total_in and total_out. 60/head
Mika Lindqvist [Sat, 21 Nov 2015 14:53:40 +0000 (16:53 +0200)] 
Use size_t for total_in and total_out.

9 years agoType cleanup.
Mika Lindqvist [Mon, 14 Dec 2015 08:11:39 +0000 (10:11 +0200)] 
Type cleanup.

9 years agoMerge pull request #59 from Dead2/hacknslash2
Hans Kristian Rosbach [Mon, 14 Dec 2015 07:26:40 +0000 (08:26 +0100)] 
Merge pull request #59 from Dead2/hacknslash2

Mix of fixes and improvements

9 years agoMerge pull request #58 from mtl1979/import
Hans Kristian Rosbach [Mon, 14 Dec 2015 07:23:43 +0000 (08:23 +0100)] 
Merge pull request #58 from mtl1979/import

Fix bug that accepted invalid zlib header when windowBits is zero.

9 years agoFix bug that accepted invalid zlib header when windowBits is zero. 58/head
Mark Adler [Fri, 27 Nov 2015 06:52:25 +0000 (22:52 -0800)] 
Fix bug that accepted invalid zlib header when windowBits is zero.

When windowBits is zero, the size of the sliding window comes from
the zlib header.  The allowed values of the four-bit field are
0..7, but when windowBits is zero, values greater than 7 are
permitted and acted upon, resulting in large, mostly unused memory
allocations.  This fix rejects such invalid zlib headers.

9 years agoType cleanup. 59/head
Mika Lindqvist [Sun, 22 Nov 2015 15:15:58 +0000 (17:15 +0200)] 
Type cleanup.

9 years agoFix creating shared library under MSYS64.
Mika Lindqvist [Sun, 22 Nov 2015 17:35:34 +0000 (19:35 +0200)] 
Fix creating shared library under MSYS64.

9 years agoFix compilation on BSD
Evan Nemerson [Tue, 29 Sep 2015 15:34:28 +0000 (08:34 -0700)] 
Fix compilation on BSD

The endianness functions are in <sys/endian.h>, not <endian.h> as
they are in Linux.

9 years agominigzip: Use bigger buffer for writing.
Mika Lindqvist [Sun, 22 Nov 2015 21:40:57 +0000 (23:40 +0200)] 
minigzip: Use bigger buffer for writing.

9 years agoMerge pull request #56 from Dead2/hacknslash2
Hans Kristian Rosbach [Wed, 25 Nov 2015 12:37:27 +0000 (13:37 +0100)] 
Merge pull request #56 from Dead2/hacknslash2

Improvements for MSVC and backport fixes from zlib upstream and intel's fork

9 years agoRemove inline and extern from function declaration. 56/head
Hans Kristian Rosbach [Tue, 17 Nov 2015 14:45:45 +0000 (15:45 +0100)] 
Remove inline and extern from function declaration.

9 years agoMerge pull request #55 from jibsen/fix-uninitialized-var
Hans Kristian Rosbach [Mon, 9 Nov 2015 20:36:50 +0000 (21:36 +0100)] 
Merge pull request #55 from jibsen/fix-uninitialized-var

Fix uninitialized variable

9 years agoFix uninitialized variable 55/head
Joergen Ibsen [Mon, 9 Nov 2015 18:57:26 +0000 (19:57 +0100)] 
Fix uninitialized variable

9 years agoSplit insert_string_sse into separate file in arch folder.
Hans Kristian Rosbach [Wed, 4 Nov 2015 19:58:56 +0000 (20:58 +0100)] 
Split insert_string_sse into separate file in arch folder.

9 years agoEnable deflate_quick under MSVC.
Mika Lindqvist [Tue, 3 Nov 2015 21:09:40 +0000 (23:09 +0200)] 
Enable deflate_quick under MSVC.

9 years agominigzip: restructure gzread() to get rid of unnecessary temporary variables.
Mika Lindqvist [Wed, 27 May 2015 20:55:35 +0000 (23:55 +0300)] 
minigzip: restructure gzread() to get rid of unnecessary temporary variables.

9 years agoFix for intels zlib fork, fixes their issues #2 and #3
Jim Kukunas [Tue, 3 Nov 2015 19:45:10 +0000 (20:45 +0100)] 
Fix for intels zlib fork, fixes their issues #2 and #3

9 years agoFix merge errors.
Hans Kristian Rosbach [Tue, 3 Nov 2015 18:35:54 +0000 (19:35 +0100)] 
Fix merge errors.

9 years agoFix typo.
Mark Adler [Sun, 16 Aug 2015 01:14:50 +0000 (18:14 -0700)] 
Fix typo.

9 years agoUse a consistent and more modern approach to not use a parameter.
Mark Adler [Sun, 4 Oct 2015 18:45:00 +0000 (11:45 -0700)] 
Use a consistent and more modern approach to not use a parameter.

A remarkably creative and diverse set of approaches to letting the
compiler know that opaque was being used when it wasn't is changed
by this commit to the more standard (void)opaque.

 Conflicts:
zutil.c

9 years agoUse UTF-8 for non-ASCII characters in ChangeLog.
Mark Adler [Wed, 16 Sep 2015 22:40:00 +0000 (15:40 -0700)] 
Use UTF-8 for non-ASCII characters in ChangeLog.

9 years agoClean up portability for shifts and integer sizes.
Mark Adler [Sun, 6 Sep 2015 01:56:55 +0000 (18:56 -0700)] 
Clean up portability for shifts and integer sizes.

9 years agoUse const for static tree descriptions in deflate.
Mark Adler [Sun, 16 Aug 2015 01:04:50 +0000 (18:04 -0700)] 
Use const for static tree descriptions in deflate.

This is in order to permit shared memory for these structures.

 Conflicts:
deflate.h

9 years agoCompile the gzopen_w() function when __CYGWIN__ defined.
Mark Adler [Sun, 2 Aug 2015 00:38:56 +0000 (17:38 -0700)] 
Compile the gzopen_w() function when __CYGWIN__ defined.

 Conflicts:
gzlib.c
zlib.h

9 years agoAssure that gzoffset() is correct when appending.
Mark Adler [Thu, 24 Apr 2014 23:45:36 +0000 (19:45 -0400)] 
Assure that gzoffset() is correct when appending.

An open() with O_APPEND followed by an lseek() to determine the
position will return zero for a non-empty file, even though the
next write will start at the end of the file.  This commit works
around that by doing an lseek() to the end when appending.

9 years agoNote in zlib.h that compress() uses Z_DEFAULT_COMPRESSION.
Mark Adler [Sat, 26 Apr 2014 15:12:37 +0000 (08:12 -0700)] 
Note in zlib.h that compress() uses Z_DEFAULT_COMPRESSION.

9 years agoDo not initialize unsigned with -1 in compress.c uncompr.c.
Mark Adler [Sun, 2 Aug 2015 23:47:14 +0000 (16:47 -0700)] 
Do not initialize unsigned with -1 in compress.c uncompr.c.

Sun compiler complained.  Use (unsigned)0 - 1 instead.

9 years agoFix uncompress() to work on lengths more than a maximum unsigned.
Mark Adler [Sat, 26 Apr 2014 15:04:09 +0000 (08:04 -0700)] 
Fix uncompress() to work on lengths more than a maximum unsigned.

 Conflicts:
uncompr.c

9 years agoFix compress() to work on lengths more than a maximum unsigned.
Mark Adler [Sat, 26 Apr 2014 04:52:19 +0000 (21:52 -0700)] 
Fix compress() to work on lengths more than a maximum unsigned.

 Conflicts:
compress.c

9 years agoAlign deflateParams() and its documentation in zlib.h.
Mark Adler [Sun, 2 Aug 2015 07:02:07 +0000 (00:02 -0700)] 
Align deflateParams() and its documentation in zlib.h.

This updates the documentation to reflect the behavior of
deflateParams() when it is not able to compress all of the input
data provided so far due to insufficient output space.  It also
assures that data provided is compressed before the parameter
changes, even if at the beginning of the stream.

 Conflicts:
deflate.c

9 years agoImprove speed of gzprintf() in transparent mode.
Mark Adler [Tue, 3 Nov 2015 17:42:14 +0000 (18:42 +0100)] 
Improve speed of gzprintf() in transparent mode.

A few minor modifications done to help with conflicts.

9 years agoFix MSVC build and clean up unneccessary BSDLIBS leftovers
Mika Lindqvist [Tue, 3 Nov 2015 17:17:37 +0000 (18:17 +0100)] 
Fix MSVC build and clean up unneccessary BSDLIBS leftovers

9 years agoClarify deflateReset() documentation.
Mark Adler [Wed, 29 Jul 2015 06:17:49 +0000 (23:17 -0700)] 
Clarify deflateReset() documentation.

It previously could have been misinterpreted to mean that parameter
changes after deflateInit2() would be reversed, which is not the
case.

(cherry picked from commit 5701f48cf5178355b1ec51614d44aa14251250e5)

9 years agoAvoid uninitialized access by gzclose_w().
Mark Adler [Wed, 29 Jul 2015 06:13:53 +0000 (23:13 -0700)] 
Avoid uninitialized access by gzclose_w().

(cherry picked from commit c901a34c92c4aa74028f541a9773df726ce2b769)

 Conflicts:
deflate.c

9 years agoApply Mark Adlers fix to remove the need for -lbsd for reallocf, and
Hans Kristian Rosbach [Tue, 3 Nov 2015 14:41:15 +0000 (15:41 +0100)] 
Apply Mark Adlers fix to remove the need for -lbsd for reallocf, and
remove our detection of reallocf.

9 years agoFix inflateInit2() bug when windowBits is 16 or 32.
Mark Adler [Wed, 29 Jul 2015 04:41:20 +0000 (21:41 -0700)] 
Fix inflateInit2() bug when windowBits is 16 or 32.

A windowBits value of 0, 16, or 32 gets the window bits from the
zlib header.  However there is no zlib header for 16, or for 32
when the input is gzip.  This commit sets the window bits for
inflate to 15 if a gzip stream is detected and windowBits was 16
or 32.

(cherry picked from commit 0db8fd371477f42c280ddeee29e6de092fabf948)

9 years agoAdd comment about not using windowBits of 8 for deflate().
Mark Adler [Wed, 29 Jul 2015 04:06:06 +0000 (21:06 -0700)] 
Add comment about not using windowBits of 8 for deflate().

(cherry picked from commit b56d1c62ee1ff9705026c94a780dd6e4577cda02)

9 years agoFollow manpage update from zlib, adding licence to manpage.
Hans Kristian Rosbach [Tue, 3 Nov 2015 14:32:46 +0000 (15:32 +0100)] 
Follow manpage update from zlib, adding licence to manpage.

9 years agoRemedy Coverity warning. [Randers-Pehrson]
Mark Adler [Tue, 27 Jan 2015 05:41:26 +0000 (21:41 -0800)] 
Remedy Coverity warning. [Randers-Pehrson]

 Conflicts:
inflate.c

9 years agoClean up
Hans Kristian Rosbach [Tue, 3 Nov 2015 14:22:16 +0000 (15:22 +0100)] 
Clean up

9 years agoAvoid left shift of a negative value in flush rank calculation.
Mark Adler [Sun, 5 Jul 2015 20:51:50 +0000 (13:51 -0700)] 
Avoid left shift of a negative value in flush rank calculation.

The C standard permits an undefined result for a left shift of a
negative value.

9 years agoAdd support for std3_longest_match with MSVC
Hans Kristian Rosbach [Tue, 3 Nov 2015 12:49:58 +0000 (13:49 +0100)] 
Add support for std3_longest_match with MSVC
Based on patch by Mat Berchtold.

9 years agoEnable optimizations for MSVC and fix compiler warnings.
Mika Lindqvist [Fri, 30 Oct 2015 10:51:28 +0000 (12:51 +0200)] 
Enable optimizations for MSVC and fix compiler warnings.

9 years agoClean up x86.c a bit
Hans Kristian Rosbach [Tue, 3 Nov 2015 12:06:44 +0000 (13:06 +0100)] 
Clean up x86.c a bit

9 years agoAdd support for MSVC crc32 intrinsic
Mat Berchtold [Thu, 29 Oct 2015 14:39:32 +0000 (15:39 +0100)] 
Add support for MSVC crc32 intrinsic

9 years agoseparated cpuid from up x86_check_features
Mat Berchtold [Fri, 30 Oct 2015 13:37:32 +0000 (14:37 +0100)] 
separated cpuid from up x86_check_features
new cpuid functions for different compilers

9 years agocpuid for msvc
Mat Berchtold [Thu, 29 Oct 2015 14:38:02 +0000 (15:38 +0100)] 
cpuid for msvc

9 years agofix macro for msvc
Mat Berchtold [Thu, 29 Oct 2015 14:38:40 +0000 (15:38 +0100)] 
fix macro for msvc

9 years agoAdd-ALIGNED_-macro-to-support-MSVC
Mat Berchtold [Thu, 29 Oct 2015 14:40:16 +0000 (15:40 +0100)] 
Add-ALIGNED_-macro-to-support-MSVC

9 years agoMerge pull request #54 from matbech/patch-1
Hans Kristian Rosbach [Fri, 30 Oct 2015 14:24:26 +0000 (15:24 +0100)] 
Merge pull request #54 from matbech/patch-1

Replace define Byte with typedef

9 years agoMerge pull request #53 from Dead2/hacknslash2
Hans Kristian Rosbach [Fri, 30 Oct 2015 14:16:43 +0000 (15:16 +0100)] 
Merge pull request #53 from Dead2/hacknslash2

Deflate cleanup and optimizations

9 years agofix for preprocessor namespace pollution 54/head
Mat [Fri, 30 Oct 2015 09:39:02 +0000 (10:39 +0100)] 
fix for preprocessor namespace pollution

Do not pollute the namespace with a define for byte. This breaks various things. Instead use typedef which was also used in the original version of zlib.conf:

#if !defined(__MACTYPES__)
typedef unsigned char  Byte;  /* 8 bits */
#endif
typedef unsigned int   uInt;  /* 16 bits or more */
typedef unsigned long  uLong; /* 32 bits or more */

#ifdef SMALL_MEDIUM
   /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */
#  define Bytef Byte FAR
#else
   typedef Byte  FAR Bytef;
#endif

9 years agoMerge pull request #47 from mtl1979/configure
Hans Kristian Rosbach [Wed, 7 Oct 2015 08:44:06 +0000 (10:44 +0200)] 
Merge pull request #47 from mtl1979/configure

Extend logic of multilib handling to work on 64-bit hosts too.

9 years agoMerge pull request #49 from tbeu/patch-1
Hans Kristian Rosbach [Wed, 7 Oct 2015 08:42:41 +0000 (10:42 +0200)] 
Merge pull request #49 from tbeu/patch-1

Remove now obsolete snprintf comment

9 years agoRemove now obsolete comment 49/head
tbeu [Tue, 6 Oct 2015 19:53:40 +0000 (21:53 +0200)] 
Remove now obsolete comment

... about snprintf() being not available in MSVC

9 years agoExtend logic of multilib handling to work on 64-bit hosts too. 47/head
Mika Lindqvist [Sun, 23 Aug 2015 15:13:55 +0000 (18:13 +0300)] 
Extend logic of multilib handling to work on 64-bit hosts too.

10 years agoWhitespace cleanup 53/head
Hans Kristian Rosbach [Fri, 26 Jun 2015 13:43:09 +0000 (15:43 +0200)] 
Whitespace cleanup

10 years agoMake bulk_insert implementation of insert_match behave more like
Hans Kristian Rosbach [Fri, 26 Jun 2015 13:22:36 +0000 (15:22 +0200)] 
Make bulk_insert implementation of insert_match behave more like
the original code, this also lets us optimize the match_length=1 case.

10 years agoNo need to update hash_head.
Hans Kristian Rosbach [Thu, 25 Jun 2015 20:34:06 +0000 (22:34 +0200)] 
No need to update hash_head.
Plus a single style change to match the other deflate algorithms.

10 years agoMake insert_string_sse more similar to insert_string_c.
Hans Kristian Rosbach [Wed, 24 Jun 2015 21:06:13 +0000 (23:06 +0200)] 
Make insert_string_sse more similar to insert_string_c.

10 years agoUse bulk_insert_str() in deflate_medium.c too.
Mika Lindqvist [Wed, 24 Jun 2015 18:34:32 +0000 (21:34 +0300)] 
Use bulk_insert_str() in deflate_medium.c too.

10 years agoSplit deflate.c
Mika Lindqvist [Wed, 24 Jun 2015 17:57:34 +0000 (20:57 +0300)] 
Split deflate.c
* Separate common inlines and macros to deflate_p.h
* Separate deflate_fast related code to deflate_fast.c
* Separate deflate_medium related code to deflate_medium.c
* Separate deflate_slow related code to deflate_slow.c

10 years agoOptimize insert_str() and bulk_insert_str().
Hans Kristian Rosbach [Tue, 23 Jun 2015 19:18:07 +0000 (21:18 +0200)] 
Optimize insert_str() and bulk_insert_str().
Co-authored with Mika Lindqvist.

10 years agoOptimize deflate_fast by using bulk_insert_str()
Hans Kristian Rosbach [Tue, 23 Jun 2015 19:14:20 +0000 (21:14 +0200)] 
Optimize deflate_fast by using bulk_insert_str()
Co-authored with Mika Lindqvist.

10 years agoImprove dictionary handling.
Hans Kristian Rosbach [Thu, 11 Jun 2015 15:05:30 +0000 (17:05 +0200)] 
Improve dictionary handling.
Based on commit e07ac7d8 from Cloudflare's fork, by Vlad Krasnov.

10 years agoAllow building on OS X
RenĂ© J.V. Bertin [Tue, 9 Jun 2015 21:59:15 +0000 (23:59 +0200)] 
Allow building on OS X

10 years agoMerge branch 'codestyle' into develop
Hans Kristian Rosbach [Fri, 5 Jun 2015 16:37:34 +0000 (18:37 +0200)] 
Merge branch 'codestyle' into develop

10 years agoRevert "Replace 'unsigned long' with most suitable fixed-size type."
Hans Kristian Rosbach [Fri, 5 Jun 2015 16:34:42 +0000 (18:34 +0200)] 
Revert "Replace 'unsigned long' with most suitable fixed-size type."

This commit was cherry-picked and was not done, resulting in a few
problems with gcc on 64bit windows.

This reverts commit edd7a72e056b994458ff040d4740b16b35336b60.

Conflicts:
arch/x86/crc_folding.c
arch/x86/fill_window_sse.c
deflate.c
deflate.h
match.c
trees.c

10 years agoMerge pull request #39 from mtl1979/minigzip
Hans Kristian Rosbach [Fri, 5 Jun 2015 16:05:44 +0000 (18:05 +0200)] 
Merge pull request #39 from mtl1979/minigzip

minigzip: allocate temporary buffer inside gzopen.

This fixes the abysmally slow minigzip decompression when compiling without --zlib-compat

10 years agominigzip: allocate temporary buffer inside gzopen. 39/head
Mika Lindqvist [Tue, 26 May 2015 12:51:58 +0000 (15:51 +0300)] 
minigzip: allocate temporary buffer inside gzopen.

10 years agoMerge pull request #37 from Dead2/codestyle
Hans Kristian Rosbach [Thu, 4 Jun 2015 18:40:31 +0000 (20:40 +0200)] 
Merge pull request #37 from Dead2/codestyle

Clean up the code to more closely match the Google styleguide

10 years agoMerge pull request #38 from mtl1979/vc14
Hans Kristian Rosbach [Thu, 4 Jun 2015 16:19:54 +0000 (18:19 +0200)] 
Merge pull request #38 from mtl1979/vc14

Improve support for Visual Studio 2015.

10 years agoFix detecting Windows in zconf.h(.in) 38/head
Mika Lindqvist [Sat, 30 May 2015 17:54:30 +0000 (20:54 +0300)] 
Fix detecting Windows in zconf.h(.in)

10 years agosnprintf() was added to Visual Studio 2015.
Mika Lindqvist [Fri, 29 May 2015 23:13:47 +0000 (02:13 +0300)] 
snprintf() was added to Visual Studio 2015.

10 years agoFix compile errors in trees.c after style cleanup 37/head
Hans Kristian Rosbach [Mon, 25 May 2015 21:17:58 +0000 (23:17 +0200)] 
Fix compile errors in trees.c after style cleanup

10 years agoStyle cleanup for trees.*
Hans Kristian Rosbach [Mon, 25 May 2015 21:05:13 +0000 (23:05 +0200)] 
Style cleanup for trees.*