zlib replacement with optimizations for "next generation" systems.
Go to file
Mika Lindqvist 53204685c0 Avoid hashing same memory location twice by truncating overlapping byte ranges,
it's speed optimization as the inner code also checks that previous hash value
is not same as new hash value. Essentially those two checks together makes the
compression a little more efficient as it can remember matches further apart.
As far as I remember from my tests, the secondary path was triggered only twice
in very long uncompressed file, but the gain in compression rate was still noticeable.
2017-02-16 11:19:57 +01:00
arch quick_send_bits: variable 'code' is not used anymore. 2017-02-13 23:41:30 +02:00
doc zlib 1.2.5.1 2011-09-11 11:04:49 -07:00
test Fix so Travis doesn't fail on CVE tests without --zlib-compat. 2017-02-13 19:28:32 +02:00
tools CMakeLists.txt: better checking for Intel intrinsics. 2017-02-13 12:41:04 +02:00
win32 Fix build with nmake. 2017-02-13 23:36:20 +02:00
.gitattributes Add a.exe to cleanup list. 2017-01-30 10:36:53 +01:00
.gitignore Update .gitignore 2017-01-30 10:53:40 +01:00
.travis.yml Add --native flag to configure 2017-02-13 22:05:53 +01:00
adler32.c zlib 1.2.9 2017-02-09 11:39:40 +01:00
ChangeLog.zlib zlib 1.2.11 2017-02-13 10:16:17 +01:00
CMakeLists.txt Move instruction set specific crc32 code to arch directories. 2017-02-13 13:18:43 +02:00
compress.c zlib 1.2.9 2017-02-09 11:39:40 +01:00
configure Add --native flag to configure 2017-02-13 22:05:53 +01:00
crc32.c Replace remaining Z_NULL instances with NULL. 2017-02-13 18:17:37 +02:00
crc32.h Style cleanup for adler/crc code 2015-05-25 23:03:25 +02:00
deflate_fast.c Merge insert_string and bulk_insert_str. 2017-01-30 12:07:06 +01:00
deflate_medium.c Avoid hashing same memory location twice by truncating overlapping byte ranges, 2017-02-16 11:19:57 +01:00
deflate_p.h Avoid use of DEBUG macro -- change to ZLIB_DEBUG. 2017-02-06 14:33:22 +01:00
deflate_slow.c Merge insert_string and bulk_insert_str. 2017-01-30 12:07:06 +01:00
deflate.c Fix leftover charf 2017-02-15 12:34:51 +01:00
deflate.h Add block_open state for deflate_quick 2017-02-13 10:16:51 +01:00
FAQ.zlib zlib 1.2.11 2017-02-13 10:16:17 +01:00
gzclose.c Style cleanup for gzfile code 2015-05-25 23:01:55 +02:00
gzguts.h zlib 1.2.9 2017-02-09 11:39:40 +01:00
gzlib.c zlib 1.2.11 2017-02-13 10:16:17 +01:00
gzread.c Fix build with nmake. 2017-02-13 23:36:20 +02:00
gzwrite.c Fix build with nmake. 2017-02-13 23:36:20 +02:00
INDEX zlib 1.2.11 2017-02-13 10:16:17 +01:00
infback.c zlib 1.2.9 2017-02-09 11:39:40 +01:00
inffast.c zlib 1.2.11 2017-02-13 10:16:17 +01:00
inffast.h Type cleanup. 2015-12-14 11:00:22 +02:00
inffixed.h Get inffixed.h and MAKEFIXED result to match. 2011-10-05 20:32:32 -07:00
inflate.c zlib 1.2.9 2017-02-09 11:39:40 +01:00
inflate.h zlib 1.2.9 2017-02-09 11:39:40 +01:00
inftrees.c zlib 1.2.11 2017-02-13 10:16:17 +01:00
inftrees.h Style cleanup for inflate code 2015-05-25 23:00:54 +02:00
LICENSE.md Update readme and create LICENSE.md file 2015-04-10 12:26:51 +02:00
Makefile.in Makefile.in: Update rule to reset zconf.h.cmakein 2017-02-13 21:01:08 +01:00
match.c Move Visual C++ workaround for CTZL to arch/x86. 2017-02-13 13:18:47 +02:00
match.h Type cleanup. 2015-12-14 11:00:22 +02:00
README Actually commit the updated README file. 2015-04-10 13:21:23 +02:00
README.md Add README file with markup code enabled, allows links and images to be shown on github. 2015-05-08 15:07:19 +02:00
README.zlib zlib 1.2.11 2017-02-13 10:16:17 +01:00
treebuild.xml zlib 1.2.11 2017-02-13 10:16:17 +01:00
trees.c Update vestigial comment from very old Info-ZIP deflate. 2017-02-13 10:08:35 +01:00
trees.h local -> static 2017-01-30 10:35:05 +01:00
uncompr.c Use a uniform approach for the largest value of an unsigned type. 2017-02-07 10:38:47 +01:00
zconf.h.in zlib 1.2.9 2017-02-09 11:39:40 +01:00
zlib.3 zlib 1.2.11 2017-02-13 10:16:17 +01:00
zlib.3.pdf zlib 1.2.11 2017-02-13 10:16:17 +01:00
zlib.h zlib 1.2.11 2017-02-13 10:16:17 +01:00
zlib.map zlib 1.2.9 2017-02-09 11:39:40 +01:00
zlib.pc.cmakein Generate and install the pkg-config file with cmake. 2012-03-11 10:16:04 -07:00
zlib.pc.in zlib 1.2.4.4 2011-09-09 23:34:45 -07:00
zutil.c zlib 1.2.11 2017-02-13 10:16:17 +01:00
zutil.h zlib 1.2.9 2017-02-09 11:39:40 +01:00

Travis CI: build status

zlib-ng - zlib for the next generation systems

Maintained by Hans Kristian Rosbach aka Dead2 (zlib-ng àt circlestorm dót org)

Fork Motivation and History

The motivation for this fork was due to seeing several 3rd party contributions containing new optimizations not getting implemented into the official zlib repository.

Mark Adler has been maintaining zlib for a very long time, and he has done a great job and hopefully he will continue for a long time yet. The idea of zlib-ng is not to replace zlib, but to co-exist as a drop-in replacement with a lower threshold for code change.

zlib has a long history and is incredibly portable, even supporting lots of systems that predate the Internet. This is great, but it does complicate further development and maintainability. The zlib code has to make numerous workarounds for old compilers that do not understand ANSI-C or to accommodate systems with limitations such as operating in a 16-bit environment.

Many of these workarounds are only maintenance burdens, some of them are pretty huge code-wise. For example, the [v]s[n]printf workaround code has a whopping 8 different implementations just to cater to various old compilers. With this many workarounds cluttered throughout the code, new programmers with an idea/interest for zlib will need to take some time to figure out why all of these seemingly strange things are used, and how to work within those confines.

So I decided to make a fork, merge all the Intel optimizations, merge the Cloudflare optimizations that did not conflict, plus a couple of other smaller patches. Then I started cleaning out workarounds, various dead code, all contrib and example code as there is little point in having those in this fork for different reasons.

Lastly I have been cleaning up the handling of different arches, so that it will be easier to implement arch-specific code without cluttering up the main code too much.

Now, there is still a lot to do and I am sure there are better ways of doing several of the changes I have done. And I would be delighted to receive patches, preferably as pull requests on github. Just remember that any code you submit must be your own and it must be zlib licensed.

Please read LICENSE.md, it is very simple and very liberal.

Acknowledgments

Big thanks to Raske Sider AS / raskesider.no for sponsoring my maintainership of zlib-ng.

The deflate format used by zlib was defined by Phil Katz. The deflate and zlib specifications were written by L. Peter Deutsch.

zlib was originally created by Jean-loup Gailly (compression) and Mark Adler (decompression).