Commit Graph

106 Commits

Author SHA1 Message Date
Mark Adler
f9bb580bcb Clean up type conversions.
Based on upstream 7096424f23df1b1813237fb5f8bc8f34cfcedd0c, but
modified heavily to match zlib-ng.
2017-01-31 12:24:20 +01:00
Mika Lindqvist
5727bfca8a Update -DGEN_TREES_H output to match trees.h 2017-01-30 13:50:22 +01:00
Mika Lindqvist
631817cce8 local -> static
* local -> static
* Normalize and cleanup line-endings
* Fix warnings under Visual Studio.
* Whitespace cleanup

***
This patch has been edited to merge cleanly and to exclude type changes.
Based on 8d7a7c3b82c6e38734bd504dac800b148ab410d0 "Type Cleanup"
2017-01-30 10:35:05 +01:00
Milan Ševčík
c051b6b68d Using correct format specifiers
Fixes bug #73
2016-07-18 22:18:25 +02:00
Mika Lindqvist
9c3a280877 Type cleanup. 2015-12-14 11:00:22 +02:00
Mark Adler
f7e045e8ad Use const for static tree descriptions in deflate.
This is in order to permit shared memory for these structures.

 Conflicts:
	deflate.h
2015-11-03 19:12:22 +01:00
Hans Kristian Rosbach
8145354217 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 edd7a72e05.

Conflicts:
	arch/x86/crc_folding.c
	arch/x86/fill_window_sse.c
	deflate.c
	deflate.h
	match.c
	trees.c
2015-06-05 18:35:25 +02:00
Hans Kristian Rosbach
4d2c00852d Fix compile errors in trees.c after style cleanup 2015-05-25 23:17:58 +02:00
Hans Kristian Rosbach
0a2fdcd627 Style cleanup for trees.* 2015-05-25 23:05:13 +02:00
Mika Lindqvist
edd7a72e05 Replace 'unsigned long' with most suitable fixed-size type. 2015-05-23 22:06:25 +02:00
Hans Kristian Rosbach
565cd874be Merge branch 'develop' of github.com:Dead2/zlib-ng into develop 2015-05-23 21:15:42 +02:00
Hans Kristian Rosbach
f533fd6e9b Update remaining function prototypes to ANSI C standard 2015-05-23 21:14:45 +02:00
Mika Lindqvist
09403c93fd Cleanup user-defined types for 'unsigned char'
* Change 'uch' to 'unsigned char'
* Change 'Byte' to 'unsigned char'
2015-05-23 01:22:20 +03:00
Hans Kristian Rosbach
80d5ed789c Replace ush with uint16_t
Conflicts:
	deflate.c
	deflate.h
	trees.c
	zutil.h
2015-05-22 22:08:55 +03:00
Daniel Axtens
24cfc4d7bb Kill Byte and Bytef
Signed-off-by: Daniel Axtens <dja@axtens.net>

Conflicts:
	adler32.c
	compress.c
	deflate.c
	inflate.c
	match.c
	test/example.c
	uncompr.c
	zlib.h
2015-05-17 18:11:59 +02:00
Hans Kristian Rosbach
54e89ea53f Replace NULL comparisons
Conflicts:
	trees.c
2015-05-17 18:01:22 +02:00
hansr
84002037ee Rewrite K&R-style function prototypes to ANSI-C-style.
Only internal functions, no exported functions in this commit.
2014-10-18 22:49:16 +02:00
hansr
c4963b5ebf Remove FAR variants of variables ushf, schf, Posf, Bytef, charf,
intf, uIntf and uLongf
2014-10-16 15:32:17 +02:00
hansr
3f8e26e0b7 Remove workarounds for non-ANSI-C compatible compilers (Part 2)
-Removing usage of OF() definition
2014-10-12 22:57:27 +02:00
hansr
f7e1e0130f Remove workarounds for non-ANSI-C compatible compilers (Part 1) 2014-10-12 12:38:06 +02:00
Jim Kukunas
d948170e11 deflate: add new deflate_quick strategy for level 1
The deflate_quick strategy is designed to provide maximum
deflate performance.

deflate_quick achieves this through:
    - only checking the first hash match
    - using a small inline SSE4.2-optimized longest_match
    - forcing a window size of 8K, and using a precomputed dist/len
      table
    - forcing the static Huffman tree and emitting codes immediately
      instead of tallying

This patch changes the scope of flush_pending, bi_windup, and
static_ltree to ZLIB_INTERNAL and moves END_BLOCK, send_code,
put_short, and send_bits to deflate.h.

Updates the configure script to enable by default for x86. On systems
without SSE4.2, fallback is to deflate_fast strategy.

Fixes #6
Fixes #8
2014-07-26 15:53:17 -07:00
Mark Adler
62d6112a79 Clean up the usage of z_const and respect const usage within zlib.
This patch allows zlib to compile cleanly with the -Wcast-qual gcc
warning enabled, but only if ZLIB_CONST is defined, which adds
const to next_in and msg in z_stream and in the in_func prototype.
A --const option is added to ./configure which adds -DZLIB_CONST
to the compile flags, and adds -Wcast-qual to the compile flags
when ZLIBGCCWARN is set in the environment.
2012-08-13 00:02:40 -07:00
Mark Adler
0b828b4aa6 Write out all of the available bits when using Z_BLOCK.
Previously, the bit buffer would hold 1 to 16 bits after "all" of the
output is provided after a Z_BLOCK deflate() call.  Now at most seven
bits remain in the output buffer after Z_BLOCK.  flush_pending() now
flushes the bit buffer before copying out the byte buffer, in order
for it to really flush as much as possible.
2012-01-07 14:08:02 -08:00
Mark Adler
8f5eceefe8 Remove second empty static block for Z_PARTIAL_FLUSH.
Z_PARTIAL_FLUSH would sometimes emit two empty static blocks instead
of one in order to provide enough lookahead for inflate to be able
to decode what was last compressed.  inflate no longer needs that
much lookahead, so this removes the possibility of emitting the
second empty static block.  Z_PARTIAL_FLUSH will now emit only one
empty static block.
2012-01-07 14:03:07 -08:00
Mark Adler
263b1a05b0 Allow deflatePrime() to insert bits in the middle of a stream.
This allows the insertion of multiple empty static blocks for the
purpose of efficiently bringing a stream to a byte boundary.
2012-01-07 14:03:07 -08:00
Mark Adler
9712272c78 zlib 1.2.5 2011-09-09 23:35:10 -07:00
Mark Adler
7301420248 zlib 1.2.4.5 2011-09-09 23:34:55 -07:00
Mark Adler
67cc20d004 zlib 1.2.4-pre1 2011-09-09 23:32:36 -07:00
Mark Adler
f6194ef39a zlib 1.2.3.4 2011-09-09 23:26:40 -07:00
Mark Adler
b1c19ca6d8 zlib 1.2.3.1 2011-09-09 23:25:27 -07:00
Mark Adler
9c3a583021 zlib 1.2.2.4 2011-09-09 23:24:52 -07:00
Mark Adler
0484693e17 zlib 1.2.2.2 2011-09-09 23:24:33 -07:00
Mark Adler
9811b53dd9 zlib 1.2.2.1 2011-09-09 23:24:24 -07:00
Mark Adler
7a6955760b zlib 1.2.1.2 2011-09-09 23:23:45 -07:00
Mark Adler
b97ec631c6 zlib 1.2.0.7 2011-09-09 23:23:01 -07:00
Mark Adler
13a294f044 zlib 1.2.0.1 2011-09-09 23:21:57 -07:00
Mark Adler
7c2a874e50 zlib 1.2.0 2011-09-09 23:21:47 -07:00
Mark Adler
a383133c4e zlib 1.1.4 2011-09-09 23:20:42 -07:00
Mark Adler
14763ac7c6 zlib 1.1.3 2011-09-09 23:20:29 -07:00
Mark Adler
02b6cf579f zlib 1.1.1 2011-09-09 23:20:07 -07:00
Mark Adler
965fe72aed zlib 1.1.0 2011-09-09 23:19:55 -07:00
Mark Adler
6759211ad8 zlib 1.0.8 2011-09-09 23:18:57 -07:00
Mark Adler
7850e4e406 zlib 1.0.7 2011-09-09 23:17:33 -07:00
Mark Adler
ff11b0a61f zlib 1.0.4 2011-09-09 23:17:02 -07:00
Mark Adler
e26a448e96 zlib 1.0.2 2011-09-09 23:15:17 -07:00
Mark Adler
423eb40306 zlib 1.0.1 2011-09-09 23:14:39 -07:00
Mark Adler
8a2acbffc8 zlib 1.0-pre 2011-09-09 23:13:27 -07:00
Mark Adler
56bcb184fa zlib 0.99 2011-09-09 23:11:37 -07:00
Mark Adler
25e5325501 zlib 0.95 2011-09-09 23:10:21 -07:00
Mark Adler
23c69f1069 zlib 0.94 2011-09-09 23:09:18 -07:00
Mark Adler
6b834a58bd zlib 0.93 2011-09-09 23:08:28 -07:00
Mark Adler
bdde4e09d2 zlib 0.92 2011-09-09 23:08:07 -07:00
Mark Adler
64b2e89203 zlib 0.9 2011-09-09 23:06:52 -07:00
Mark Adler
4ca984fb44 zlib 0.8 2011-09-09 23:03:14 -07:00
Mark Adler
913afb9174 zlib 0.79 2011-09-09 22:52:17 -07:00
Mark Adler
bcf78a2097 zlib 0.71 2011-09-09 22:36:31 -07:00