From: Mark Adler Date: Sat, 31 Dec 2016 19:41:31 +0000 (-0800) Subject: zlib 1.2.9 X-Git-Tag: 1.9.9-b1~708 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a51c84f6c40538b2641af3a211771c329f61a47;p=thirdparty%2Fzlib-ng.git zlib 1.2.9 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index a6dec89e2..6c59cb5bd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,7 @@ set(CMAKE_LEGACY_CYGWIN_WIN32 0) # Remove when CMake >= 2.8.4 is required project(zlib C) -set(VERSION "1.2.8") +set(VERSION "1.2.9") set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") diff --git a/ChangeLog.zlib b/ChangeLog.zlib index 2adb46810..b32012f71 100644 --- a/ChangeLog.zlib +++ b/ChangeLog.zlib @@ -1,12 +1,44 @@ -## -# THIS IS AN UNMAINTAINED COPY OF THE ORIGINAL FILE DISTRIBUTED WITH ZLIB 1.2.8 -## +## +# THIS IS AN UNMAINTAINED COPY OF THE ORIGINAL FILE DISTRIBUTED WITH ZLIB 1.2.9 +## ChangeLog file for zlib +Changes in 1.2.9 (31 Dec 2016) +- Fix contrib/minizip to permit unzipping with desktop API [Zouzou] +- Improve contrib/blast to return unused bytes +- Assure that gzoffset() is correct when appending +- Improve compress() and uncompress() to support large lengths +- Fix bug in test/example.c where error code not saved +- Remedy Coverity warning [Randers-Pehrson] +- Improve speed of gzprintf() in transparent mode +- Fix inflateInit2() bug when windowBits is 16 or 32 +- Change DEBUG macro to ZLIB_DEBUG +- Avoid uninitialized access by gzclose_w() +- Allow building zlib outside of the source directory +- Fix bug that accepted invalid zlib header when windowBits is zero +- Fix gzseek() problem on MinGW due to buggy _lseeki64 there +- Loop on write() calls in gzwrite.c in case of non-blocking I/O +- Add --warn (-w) option to ./configure for more compiler warnings +- Reject a window size of 256 bytes if not using the zlib wrapper +- Fix bug when level 0 used with Z_HUFFMAN or Z_RLE +- Add --debug (-d) option to ./configure to define ZLIB_DEBUG +- Fix bugs in creating a very large gzip header +- Add uncompress2() function, which returns the input size used +- Assure that deflateParams() will not switch functions mid-block +- Dramatically speed up deflation for level 0 (storing) +- Add gzfread(), duplicating the interface of fread() +- Add gzfwrite(), duplicating the interface of fwrite() +- Add deflateGetDictionary() function +- Use snprintf() for later versions of Microsoft C +- Fix *Init macros to use z_ prefix when requested +- Replace as400 with os400 for OS/400 support [Monnerat] +- Add crc32_z() and adler32_z() functions with size_t lengths +- Update Visual Studio project files [AraHaan] + Changes in 1.2.8 (28 Apr 2013) - Update contrib/minizip/iowin32.c for Windows RT [Vollant] - Do not force Z_CONST for C++ diff --git a/Makefile.in b/Makefile.in index f8bf80719..3c0e5c68f 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,5 +1,5 @@ # Makefile for zlib -# Copyright (C) 1995-2013 Jean-loup Gailly, Mark Adler +# Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler # For conditions of distribution and use, see copyright notice in zlib.h # To compile and test, type: @@ -27,10 +27,10 @@ LDSHARED=$(CC) STATICLIB=libz.a SHAREDLIB=libz.so -SHAREDLIBV=libz.so.1.2.8 +SHAREDLIBV=libz.so.1.2.9 SHAREDLIBM=libz.so.1 IMPORTLIB= -SHAREDTARGET=libz.so.1.2.8 +SHAREDTARGET=libz.so.1.2.9 LIBS=$(STATICLIB) $(SHAREDTARGET) diff --git a/adler32.c b/adler32.c index 1ce855e24..0da5deed6 100644 --- a/adler32.c +++ b/adler32.c @@ -1,5 +1,5 @@ /* adler32.c -- compute the Adler-32 checksum of a data stream - * Copyright (C) 1995-2011 Mark Adler + * Copyright (C) 1995-2011, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/compress.c b/compress.c index d4f99bb31..78ecb8623 100644 --- a/compress.c +++ b/compress.c @@ -1,5 +1,5 @@ /* compress.c -- compress a memory buffer - * Copyright (C) 1995-2005, 2014 Jean-loup Gailly, Mark Adler. + * Copyright (C) 1995-2005, 2014, 2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/crc32.c b/crc32.c index 4cc505756..d469601c0 100644 --- a/crc32.c +++ b/crc32.c @@ -1,5 +1,5 @@ /* crc32.c -- compute the CRC-32 of a data stream - * Copyright (C) 1995-2006, 2010, 2011, 2012 Mark Adler + * Copyright (C) 1995-2006, 2010, 2011, 2012, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h * * Thanks to Rodney Brown for his contribution of faster diff --git a/deflate.c b/deflate.c index 2b3e88f2f..71f77a0ac 100644 --- a/deflate.c +++ b/deflate.c @@ -53,7 +53,7 @@ #include "deflate_p.h" #include "match.h" -const char deflate_copyright[] = " deflate 1.2.8.f Copyright 1995-2016 Jean-loup Gailly and Mark Adler "; +const char deflate_copyright[] = " deflate 1.2.9.f Copyright 1995-2016 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot diff --git a/deflate.h b/deflate.h index 7266e53ff..75e14b1b7 100644 --- a/deflate.h +++ b/deflate.h @@ -1,7 +1,7 @@ #ifndef DEFLATE_H_ #define DEFLATE_H_ /* deflate.h -- internal compression state - * Copyright (C) 1995-2012 Jean-loup Gailly + * Copyright (C) 1995-2016 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/gzguts.h b/gzguts.h index e075bfac9..89bd3ecba 100644 --- a/gzguts.h +++ b/gzguts.h @@ -1,7 +1,7 @@ #ifndef GZGUTS_H_ #define GZGUTS_H_ /* gzguts.h -- zlib internal header definitions for gz* operations - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/gzlib.c b/gzlib.c index f152c1c59..04217db56 100644 --- a/gzlib.c +++ b/gzlib.c @@ -1,5 +1,5 @@ /* gzlib.c -- zlib functions common to reading and writing gzip files - * Copyright (C) 2004, 2010, 2011, 2012, 2013 Mark Adler + * Copyright (C) 2004, 2010, 2011, 2012, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/gzread.c b/gzread.c index a48d7bac1..0928310fe 100644 --- a/gzread.c +++ b/gzread.c @@ -1,5 +1,5 @@ /* gzread.c -- zlib functions for reading gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/gzwrite.c b/gzwrite.c index 71d50b1e5..c1dd3ca4c 100644 --- a/gzwrite.c +++ b/gzwrite.c @@ -1,5 +1,5 @@ /* gzwrite.c -- zlib functions for writing gzip files - * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler + * Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/infback.c b/infback.c index 49c90cc16..81f792e5b 100644 --- a/infback.c +++ b/infback.c @@ -1,5 +1,5 @@ /* infback.c -- inflate using a call-back interface - * Copyright (C) 1995-2011 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/inffast.c b/inffast.c index 50ec86ef4..51c276378 100644 --- a/inffast.c +++ b/inffast.c @@ -1,5 +1,5 @@ /* inffast.c -- fast decoding - * Copyright (C) 1995-2008, 2010, 2013 Mark Adler + * Copyright (C) 1995-2008, 2010, 2013, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/inflate.c b/inflate.c index 0f7e3e711..84ae6e72e 100644 --- a/inflate.c +++ b/inflate.c @@ -1,5 +1,5 @@ /* inflate.c -- zlib decompression - * Copyright (C) 1995-2012 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/inflate.h b/inflate.h index a1849e089..2e2e4e27f 100644 --- a/inflate.h +++ b/inflate.h @@ -1,5 +1,5 @@ /* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2009 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/inftrees.c b/inftrees.c index d943adc74..dba91d31f 100644 --- a/inftrees.c +++ b/inftrees.c @@ -1,5 +1,5 @@ /* inftrees.c -- generate Huffman trees for efficient decoding - * Copyright (C) 1995-2013 Mark Adler + * Copyright (C) 1995-2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ @@ -8,7 +8,7 @@ #define MAXBITS 15 -const char inflate_copyright[] = " inflate 1.2.8.f Copyright 1995-2013 Mark Adler "; +const char inflate_copyright[] = " inflate 1.2.9.f Copyright 1995-2016 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -55,7 +55,7 @@ int ZLIB_INTERNAL inflate_table(codetype type, uint16_t *lens, unsigned codes, 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const uint16_t lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 72, 78}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 192, 79}; static const uint16_t dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff --git a/test/example.c b/test/example.c index bd50d9cb2..604e13b9f 100644 --- a/test/example.c +++ b/test/example.c @@ -1,5 +1,5 @@ /* example.c -- usage example of the zlib compression library - * Copyright (C) 1995-2006, 2011 Jean-loup Gailly. + * Copyright (C) 1995-2006, 2011, 2016 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/test/infcover.c b/test/infcover.c index ee8463651..9f2d33dc4 100644 --- a/test/infcover.c +++ b/test/infcover.c @@ -1,5 +1,5 @@ /* infcover.c -- test zlib's inflate routines with full code coverage - * Copyright (C) 2011 Mark Adler + * Copyright (C) 2011, 2016 Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/test/minigzip.c b/test/minigzip.c index dd81137f1..286861e2c 100644 --- a/test/minigzip.c +++ b/test/minigzip.c @@ -1,5 +1,5 @@ /* minigzip.c -- simulate gzip using the zlib compression library - * Copyright (C) 1995-2006, 2010, 2011 Jean-loup Gailly. + * Copyright (C) 1995-2006, 2010, 2011, 2016 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/treebuild.xml b/treebuild.xml index 34a4f779a..931ee5a22 100644 --- a/treebuild.xml +++ b/treebuild.xml @@ -1,6 +1,6 @@ - - + + zip compression library diff --git a/trees.c b/trees.c index 0beafc724..8e419d25d 100644 --- a/trees.c +++ b/trees.c @@ -1,5 +1,5 @@ /* trees.c -- output deflated data using Huffman coding - * Copyright (C) 1995-2012 Jean-loup Gailly + * Copyright (C) 1995-2016 Jean-loup Gailly * detect_data_type() function provided freely by Cosmin Truta, 2006 * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/win32/README-WIN32.txt b/win32/README-WIN32.txt index 3d77d521e..5002f3c91 100644 --- a/win32/README-WIN32.txt +++ b/win32/README-WIN32.txt @@ -1,6 +1,6 @@ ZLIB DATA COMPRESSION LIBRARY -zlib 1.2.8 is a general purpose data compression library. All the code is +zlib 1.2.9 is a general purpose data compression library. All the code is thread safe. The data format used by the zlib library is described by RFCs (Request for Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt (zlib format), rfc1951.txt (deflate format) @@ -22,7 +22,7 @@ before asking for help. Manifest: -The package zlib-1.2.8-win32-x86.zip will contain the following files: +The package zlib-1.2.9-win32-x86.zip will contain the following files: README-WIN32.txt This document ChangeLog Changes since previous zlib packages diff --git a/win32/zlib.def b/win32/zlib.def index 1d0c8947a..a2188b000 100644 --- a/win32/zlib.def +++ b/win32/zlib.def @@ -8,6 +8,7 @@ EXPORTS inflateEnd ; advanced functions deflateSetDictionary + deflateGetDictionary deflateCopy deflateReset deflateParams @@ -33,12 +34,46 @@ EXPORTS compress2 compressBound uncompress + uncompress2 + gzopen + gzdopen + gzbuffer + gzsetparams + gzread + gzfread + gzwrite + gzfwrite + gzprintf + gzvprintf + gzputs + gzgets + gzputc + gzgetc + gzungetc + gzflush + gzseek + gzrewind + gztell + gzoffset + gzeof + gzdirect + gzclose + gzclose_r + gzclose_w + gzerror + gzclearerr ; large file functions + gzopen64 + gzseek64 + gztell64 + gzoffset64 adler32_combine64 crc32_combine64 ; checksum functions adler32 + adler32_z crc32 + crc32_z adler32_combine crc32_combine ; various hacks, don't look :) @@ -47,9 +82,13 @@ EXPORTS inflateInit_ inflateInit2_ inflateBackInit_ + gzgetc_ zError inflateSyncPoint get_crc_table inflateUndermine + inflateValidate + inflateCodesUsed inflateResetKeep deflateResetKeep + gzopen_w diff --git a/zconf.h.in b/zconf.h.in index 5649aee1c..597d47642 100644 --- a/zconf.h.in +++ b/zconf.h.in @@ -1,5 +1,5 @@ /* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/zlib.3 b/zlib.3 index 1cc38059d..cbac45888 100644 --- a/zlib.3 +++ b/zlib.3 @@ -1,4 +1,4 @@ -.TH ZLIB 3 "7 July 2015" +.TH ZLIB 3 "31 Dec 2016" .SH NAME zlib \- compression/decompression library .SH SYNOPSIS @@ -48,32 +48,10 @@ Changes to this version are documented in the file that accompanies the source. .LP .I zlib -is available in Java using the java.util.zip package: -.IP -http://java.sun.com/developer/technicalArticles/Programming/compression/ -.LP -A Perl interface to -.IR zlib , -written by Paul Marquess (pmqs@cpan.org), -is available at CPAN (Comprehensive Perl Archive Network) sites, -including: -.IP -http://search.cpan.org/~pmqs/IO-Compress-Zlib/ -.LP -A Python interface to -.IR zlib , -written by A.M. Kuchling (amk@magnet.com), -is available in Python 1.5 and later versions: -.IP -http://docs.python.org/library/zlib.html +is built in to many languages and operating systems, including but not limited to +Java, Python, .NET, PHP, Perl, Ruby, Swift, and Go. .LP -.I zlib -is built into -.IR tcl: -.IP -http://wiki.tcl.tk/4610 -.LP -An experimental package to read and write files in .zip format, +An experimental package to read and write files in the .zip format, written on top of .I zlib by Gilles Vollant (info@winimage.com), @@ -92,7 +70,9 @@ web site can be found at: .IP http://zlib.net/ .LP -The data format used by the zlib library is described by RFC +The data format used by the +.I zlib +library is described by RFC (Request for Comments) 1950 to 1952 in the files: .IP http://tools.ietf.org/html/rfc1950 (for the zlib header and trailer format) @@ -125,9 +105,9 @@ before asking for help. Send questions and/or comments to zlib@gzip.org, or (for the Windows DLL version) to Gilles Vollant (info@winimage.com). .SH AUTHORS AND LICENSE -Version 1.2.8.1 +Version 1.2.9 .LP -Copyright (C) 1995-2015 Jean-loup Gailly and Mark Adler +Copyright (C) 1995-2016 Jean-loup Gailly and Mark Adler .LP This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages diff --git a/zlib.3.pdf b/zlib.3.pdf index a346b5d7e..618a9cee4 100644 Binary files a/zlib.3.pdf and b/zlib.3.pdf differ diff --git a/zlib.h b/zlib.h index 597952bc4..82e533e3d 100644 --- a/zlib.h +++ b/zlib.h @@ -1,9 +1,9 @@ #ifndef ZLIB_H_ #define ZLIB_H_ /* zlib.h -- interface of the 'zlib-ng' compression library - Forked from and compatible with zlib 1.2.8 + Forked from and compatible with zlib 1.2.9 - Copyright (C) 1995-2013 Jean-loup Gailly and Mark Adler + Copyright (C) 1995-2016 Jean-loup Gailly and Mark Adler This software is provided 'as-is', without any express or implied warranty. In no event will the authors be held liable for any damages @@ -44,11 +44,11 @@ extern "C" { #define ZLIBNG_VER_REVISION 9 #define ZLIBNG_VER_SUBREVISION 0 -#define ZLIB_VERSION "1.2.8.zlib-ng" -#define ZLIB_VERNUM 0x128f +#define ZLIB_VERSION "1.2.9.zlib-ng" +#define ZLIB_VERNUM 0x129f #define ZLIB_VER_MAJOR 1 #define ZLIB_VER_MINOR 2 -#define ZLIB_VER_REVISION 8 +#define ZLIB_VER_REVISION 9 #define ZLIB_VER_SUBREVISION 0 /* diff --git a/zlib.map b/zlib.map index 55c6647eb..82ce98cf7 100644 --- a/zlib.map +++ b/zlib.map @@ -81,3 +81,14 @@ ZLIB_1.2.7.1 { inflateGetDictionary; gzvprintf; } ZLIB_1.2.5.2; + +ZLIB_1.2.9 { + inflateCodesUsed; + inflateValidate; + uncompress2; + gzfread; + gzfwrite; + deflateGetDictionary; + adler32_z; + crc32_z; +} ZLIB_1.2.7.1; diff --git a/zutil.c b/zutil.c index 6a26d6f93..b9b3710b7 100644 --- a/zutil.c +++ b/zutil.c @@ -1,5 +1,5 @@ /* zutil.c -- target dependent utility functions for the compression library - * Copyright (C) 1995-2005, 2010, 2011, 2012 Jean-loup Gailly. + * Copyright (C) 1995-2005, 2010, 2011, 2012, 2016 Jean-loup Gailly * For conditions of distribution and use, see copyright notice in zlib.h */ diff --git a/zutil.h b/zutil.h index 898eb32d3..61054cc5f 100644 --- a/zutil.h +++ b/zutil.h @@ -1,7 +1,7 @@ #ifndef ZUTIL_H_ #define ZUTIL_H_ /* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2013 Jean-loup Gailly. + * Copyright (C) 1995-2016 Jean-loup Gailly, Mark Adler * For conditions of distribution and use, see copyright notice in zlib.h */