Skip to content

Commit

Permalink
zlib 1.2.12
Browse files Browse the repository at this point in the history
  • Loading branch information
madler committed Mar 27, 2022
1 parent 296967c commit 21767c6
Show file tree
Hide file tree
Showing 43 changed files with 218 additions and 124 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

project(zlib C)

set(VERSION "1.2.11.1")
set(VERSION "1.2.12")

option(ASM686 "Enable building i686 assembly implementation")
option(AMD64 "Enable building amd64 assembly implementation")
Expand Down
162 changes: 111 additions & 51 deletions ChangeLog

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ CPP=$(CC) -E

STATICLIB=libz.a
SHAREDLIB=libz.so
SHAREDLIBV=libz.so.1.2.11.1
SHAREDLIBV=libz.so.1.2.12
SHAREDLIBM=libz.so.1
LIBS=$(STATICLIB) $(SHAREDLIBV)

Expand Down
6 changes: 3 additions & 3 deletions README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.11.1 is a general purpose data compression library. All the code is
zlib 1.2.12 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://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
Expand Down Expand Up @@ -31,7 +31,7 @@ Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
issue of Dr. Dobb's Journal; a copy of the article is available at
http://marknelson.us/1997/01/01/zlib-engine/ .

The changes made in version 1.2.11.1 are documented in the file ChangeLog.
The changes made in version 1.2.12 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory contrib/ .

Expand Down Expand Up @@ -84,7 +84,7 @@ Acknowledgments:

Copyright notice:

(C) 1995-2017 Jean-loup Gailly and Mark Adler
(C) 1995-2022 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
Expand Down
2 changes: 1 addition & 1 deletion contrib/delphi/ZLib.pas
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ procedure DecompressToUserBuf(const InBuf: Pointer; InBytes: Integer;
const OutBuf: Pointer; BufSize: Integer);

const
zlib_version = '1.2.11.1';
zlib_version = '1.2.12';

type
EZlibError = class(Exception);
Expand Down
2 changes: 1 addition & 1 deletion contrib/dotzlib/DotZLib/UnitTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public class InfoTests
public void Info_Version()
{
Info info = new Info();
Assert.AreEqual("1.2.11.1", Info.Version);
Assert.AreEqual("1.2.12", Info.Version);
Assert.AreEqual(32, info.SizeOfUInt);
Assert.AreEqual(32, info.SizeOfULong);
Assert.AreEqual(32, info.SizeOfPointer);
Expand Down
6 changes: 3 additions & 3 deletions contrib/infback9/inftree9.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* inftree9.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-2017 Mark Adler
* Copyright (C) 1995-2022 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand All @@ -9,7 +9,7 @@
#define MAXBITS 15

const char inflate9_copyright[] =
" inflate9 1.2.11.1 Copyright 1995-2017 Mark Adler ";
" inflate9 1.2.12 Copyright 1995-2022 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
Expand Down Expand Up @@ -64,7 +64,7 @@ unsigned short FAR *work;
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
128, 128, 128, 128, 128, 128, 128, 128, 129, 129, 129, 129,
130, 130, 130, 130, 131, 131, 131, 131, 132, 132, 132, 132,
133, 133, 133, 133, 144, 198, 196};
133, 133, 133, 133, 144, 199, 202};
static const unsigned short dbase[32] = { /* Distance codes 0..31 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,
Expand Down
2 changes: 1 addition & 1 deletion contrib/minizip/configure.ac
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.

AC_INIT([minizip], [1.2.11.1], [bugzilla.redhat.com])
AC_INIT([minizip], [1.2.12], [bugzilla.redhat.com])
AC_CONFIG_SRCDIR([minizip.c])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
Expand Down
2 changes: 1 addition & 1 deletion contrib/pascal/zlibpas.pas
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
interface

const
ZLIB_VERSION = '1.2.11.1';
ZLIB_VERSION = '1.2.12';
ZLIB_VERNUM = $12a0;

type
Expand Down
2 changes: 1 addition & 1 deletion contrib/vstudio/readme.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Building instructions for the DLL versions of Zlib 1.2.11.1
Building instructions for the DLL versions of Zlib 1.2.12
========================================================

This directory contains projects that build zlib and minizip using
Expand Down
8 changes: 4 additions & 4 deletions contrib/vstudio/vc10/zlib.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1, 2, 11, 1
PRODUCTVERSION 1, 2, 11, 1
FILEVERSION 1, 2, 12, 0
PRODUCTVERSION 1, 2, 12, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,12 +17,12 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.11.1\0"
VALUE "FileVersion", "1.2.12\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
END
END
BLOCK "VarFileInfo"
Expand Down
5 changes: 5 additions & 0 deletions contrib/vstudio/vc10/zlibvc.def
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,8 @@ EXPORTS
deflateGetDictionary @173
adler32_z @174
crc32_z @175

; zlib1 v1.2.12 added:
crc32_combine_gen @176
crc32_combine_gen64 @177
crc32_combine_op @178
8 changes: 4 additions & 4 deletions contrib/vstudio/vc11/zlib.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1, 2, 11, 1
PRODUCTVERSION 1, 2, 11, 1
FILEVERSION 1, 2, 12, 0
PRODUCTVERSION 1, 2, 12, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,12 +17,12 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.11.1\0"
VALUE "FileVersion", "1.2.12\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
END
END
BLOCK "VarFileInfo"
Expand Down
5 changes: 5 additions & 0 deletions contrib/vstudio/vc11/zlibvc.def
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,8 @@ EXPORTS
deflateGetDictionary @173
adler32_z @174
crc32_z @175

; zlib1 v1.2.12 added:
crc32_combine_gen @176
crc32_combine_gen64 @177
crc32_combine_op @178
8 changes: 4 additions & 4 deletions contrib/vstudio/vc12/zlib.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1, 2, 11, 1
PRODUCTVERSION 1, 2, 11, 1
FILEVERSION 1, 2, 12, 0
PRODUCTVERSION 1, 2, 12, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,12 +17,12 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.11.1\0"
VALUE "FileVersion", "1.2.12\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
END
END
BLOCK "VarFileInfo"
Expand Down
5 changes: 5 additions & 0 deletions contrib/vstudio/vc12/zlibvc.def
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,8 @@ EXPORTS
deflateGetDictionary @173
adler32_z @174
crc32_z @175

; zlib1 v1.2.12 added:
crc32_combine_gen @176
crc32_combine_gen64 @177
crc32_combine_op @178
8 changes: 4 additions & 4 deletions contrib/vstudio/vc14/zlib.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1, 2, 11, 1
PRODUCTVERSION 1, 2, 11, 1
FILEVERSION 1, 2, 12, 0
PRODUCTVERSION 1, 2, 12, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,12 +17,12 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.11.1\0"
VALUE "FileVersion", "1.2.12\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
END
END
BLOCK "VarFileInfo"
Expand Down
5 changes: 5 additions & 0 deletions contrib/vstudio/vc14/zlibvc.def
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,8 @@ EXPORTS
deflateGetDictionary @173
adler32_z @174
crc32_z @175

; zlib1 v1.2.12 added:
crc32_combine_gen @176
crc32_combine_gen64 @177
crc32_combine_op @178
8 changes: 4 additions & 4 deletions contrib/vstudio/vc9/zlib.rc
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#define IDR_VERSION1 1
IDR_VERSION1 VERSIONINFO MOVEABLE IMPURE LOADONCALL DISCARDABLE
FILEVERSION 1, 2, 11, 1
PRODUCTVERSION 1, 2, 11, 1
FILEVERSION 1, 2, 12, 0
PRODUCTVERSION 1, 2, 12, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,12 +17,12 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.11.1\0"
VALUE "FileVersion", "1.2.12\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
VALUE "Comments","DLL support by Alessandro Iacopetti & Gilles Vollant\0"
VALUE "LegalCopyright", "(C) 1995-2017 Jean-loup Gailly & Mark Adler\0"
VALUE "LegalCopyright", "(C) 1995-2022 Jean-loup Gailly & Mark Adler\0"
END
END
BLOCK "VarFileInfo"
Expand Down
5 changes: 5 additions & 0 deletions contrib/vstudio/vc9/zlibvc.def
Original file line number Diff line number Diff line change
Expand Up @@ -151,3 +151,8 @@ EXPORTS
deflateGetDictionary @173
adler32_z @174
crc32_z @175

; zlib1 v1.2.12 added:
crc32_combine_gen @176
crc32_combine_gen64 @177
crc32_combine_op @178
2 changes: 1 addition & 1 deletion crc32.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* crc32.c -- compute the CRC-32 of a data stream
* Copyright (C) 1995-2006, 2010, 2011, 2012, 2016, 2018 Mark Adler
* Copyright (C) 1995-2022 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*
* This interleaved implementation of a CRC makes use of pipelined multiple
Expand Down
4 changes: 2 additions & 2 deletions deflate.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* deflate.c -- compress data using the deflation algorithm
* Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
* Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down Expand Up @@ -52,7 +52,7 @@
#include "deflate.h"

const char deflate_copyright[] =
" deflate 1.2.11.1 Copyright 1995-2017 Jean-loup Gailly and Mark Adler ";
" deflate 1.2.12 Copyright 1995-2022 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
Expand Down
2 changes: 1 addition & 1 deletion deflate.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* deflate.h -- internal compression state
* Copyright (C) 1995-2016 Jean-loup Gailly
* Copyright (C) 1995-2018 Jean-loup Gailly
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
2 changes: 1 addition & 1 deletion gzguts.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gzguts.h -- zlib internal header definitions for gz* operations
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
* Copyright (C) 2004-2019 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
2 changes: 1 addition & 1 deletion gzlib.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gzlib.c -- zlib functions common to reading and writing gzip files
* Copyright (C) 2004-2017 Mark Adler
* Copyright (C) 2004-2019 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
2 changes: 1 addition & 1 deletion gzread.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gzread.c -- zlib functions for reading gzip files
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013, 2016 Mark Adler
* Copyright (C) 2004-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
2 changes: 1 addition & 1 deletion gzwrite.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* gzwrite.c -- zlib functions for writing gzip files
* Copyright (C) 2004-2017 Mark Adler
* Copyright (C) 2004-2019 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
2 changes: 1 addition & 1 deletion infback.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* infback.c -- inflate using a call-back interface
* Copyright (C) 1995-2016 Mark Adler
* Copyright (C) 1995-2022 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
2 changes: 1 addition & 1 deletion inflate.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* inflate.c -- zlib decompression
* Copyright (C) 1995-2016 Mark Adler
* Copyright (C) 1995-2022 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
2 changes: 1 addition & 1 deletion inflate.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* inflate.h -- internal inflate state definition
* Copyright (C) 1995-2016 Mark Adler
* Copyright (C) 1995-2019 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
6 changes: 3 additions & 3 deletions inftrees.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* inftrees.c -- generate Huffman trees for efficient decoding
* Copyright (C) 1995-2017 Mark Adler
* Copyright (C) 1995-2022 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand All @@ -9,7 +9,7 @@
#define MAXBITS 15

const char inflate_copyright[] =
" inflate 1.2.11.1 Copyright 1995-2017 Mark Adler ";
" inflate 1.2.12 Copyright 1995-2022 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
Expand Down Expand Up @@ -62,7 +62,7 @@ unsigned short FAR *work;
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
static const unsigned short 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, 198, 196};
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 202};

This comment has been minimized.

Copy link
@Adenilson

Adenilson Mar 29, 2022

@madler is there a particular reason to change this?

This comment has been minimized.

Copy link
@rhuijben

rhuijben Mar 31, 2022

I spotted this one as well. No documentation for this change.

This comment has been minimized.

Copy link
@rhuijben

rhuijben Mar 31, 2022

Looks like this table is only used for fixed decompression tables, so not interesting for most users. Not 100% sure though.

This comment has been minimized.

Copy link
@madler

madler Apr 1, 2022

Author Owner

Yes. It provides a means to detect the version of zlib used in the binary. Those values are changed in every version in a way that does not impact the functionality.

This comment has been minimized.

Copy link
@rhuijben

rhuijben Apr 1, 2022

Nice feature. Thanks for confirming!

static const unsigned short 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,
Expand Down
2 changes: 1 addition & 1 deletion os400/README400
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ZLIB version 1.2.11.1 for OS/400 installation instructions
ZLIB version 1.2.12 for OS/400 installation instructions

1) Download and unpack the zlib tarball to some IFS directory.
(i.e.: /path/to/the/zlib/ifs/source/directory)
Expand Down
Loading

2 comments on commit 21767c6

@zdenop
Copy link

@zdenop zdenop commented on 21767c6 Apr 1, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is 169 open pull requests (improvements/fixes). Will you please review them and make a new release(s) fast(er)?

@AraHaan
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it would also be nice if repo could migrate to github actions so that way it's possible for it to pack nuget packages of it as well.

I have a case where I need to use zlib in .NET but in order to do so it must first depend on native nuget packages to ensure that the target OS has a working copy of zlib it can use. Currently it uses a version of zlib that they link into System.IO.Compression.Native which does not export a few symbols I need so I depend on them on the actual native implementation. Since now there is a new 1.2.12 stresses even more of an need for vs17 folder and then use the vs17 stuff to build win-x86, win-x64, win-arm64 nuget packages. As for Linux and MacOS the same logic that would normally be used to build can be used and then generate an linux-x86, linux-x64, linux-arm, linux-arm64 (might need to include musl and rhel), MacOS would be a simple osx-x64 and osx-arm64. I need all those specific packages because they are all of what .NET supports and can run on.

Please sign in to comment.