Skip to content
This repository has been archived by the owner on Jan 31, 2024. It is now read-only.

Commit

Permalink
2017-01-22 Matthias Klose <doko@ubuntu.com>
Browse files Browse the repository at this point in the history
        * Import zlib 1.2.11.
        * configure: Regenerate.

Changes in 1.2.11 (15 Jan 2017)
- Fix deflate stored bug when pulling last block from window
- Permit immediate deflateParams changes before any deflate input

From-SVN: r244762
  • Loading branch information
doko42 authored and Matthias Klose committed Jan 22, 2017
1 parent 8d86f71 commit 0f314c7
Show file tree
Hide file tree
Showing 39 changed files with 83 additions and 92 deletions.
2 changes: 1 addition & 1 deletion zlib/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.10")
set(VERSION "1.2.11")

option(ASM686 "Enable building i686 assembly implementation")
option(AMD64 "Enable building amd64 assembly implementation")
Expand Down
4 changes: 4 additions & 0 deletions zlib/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

ChangeLog file for zlib

Changes in 1.2.11 (15 Jan 2017)
- Fix deflate stored bug when pulling last block from window
- Permit immediate deflateParams changes before any deflate input

Changes in 1.2.10 (2 Jan 2017)
- Avoid warnings on snprintf() return value
- Fix bug in deflate_stored() for zero-length input
Expand Down
5 changes: 5 additions & 0 deletions zlib/ChangeLog.gcj
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2017-01-22 Matthias Klose <doko@ubuntu.com>

* Import zlib 1.2.11.
* configure: Regenerate.

2017-01-13 Matthias Klose <doko@ubuntu.com>

* Import zlib 1.2.10.
Expand Down
4 changes: 2 additions & 2 deletions zlib/README
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ shipped with GCC as convenience.

ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.10 is a general purpose data compression library. All the code is
zlib 1.2.11 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 @@ -34,7 +34,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.10 are documented in the file ChangeLog.
The changes made in version 1.2.11 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory contrib/ .

Expand Down
2 changes: 1 addition & 1 deletion zlib/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.10';
zlib_version = '1.2.11';

type
EZlibError = class(Exception);
Expand Down
2 changes: 1 addition & 1 deletion zlib/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.10", Info.Version);
Assert.AreEqual("1.2.11", Info.Version);
Assert.AreEqual(32, info.SizeOfUInt);
Assert.AreEqual(32, info.SizeOfULong);
Assert.AreEqual(32, info.SizeOfPointer);
Expand Down
4 changes: 2 additions & 2 deletions zlib/contrib/infback9/inftree9.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAXBITS 15

const char inflate9_copyright[] =
" inflate9 1.2.10 Copyright 1995-2017 Mark Adler ";
" inflate9 1.2.11 Copyright 1995-2017 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, 192, 202};
133, 133, 133, 133, 144, 77, 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 zlib/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.10], [bugzilla.redhat.com])
AC_INIT([minizip], [1.2.11], [bugzilla.redhat.com])
AC_CONFIG_SRCDIR([minizip.c])
AM_INIT_AUTOMAKE([foreign])
LT_INIT
Expand Down
2 changes: 1 addition & 1 deletion zlib/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.10';
ZLIB_VERSION = '1.2.11';
ZLIB_VERNUM = $12a0;

type
Expand Down
2 changes: 1 addition & 1 deletion zlib/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.10
Building instructions for the DLL versions of Zlib 1.2.11
========================================================

This directory contains projects that build zlib and minizip using
Expand Down
6 changes: 3 additions & 3 deletions zlib/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, 10, 0
PRODUCTVERSION 1, 2, 10, 0
FILEVERSION 1, 2, 11, 0
PRODUCTVERSION 1, 2, 11, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,7 +17,7 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.10\0"
VALUE "FileVersion", "1.2.11\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
Expand Down
6 changes: 3 additions & 3 deletions zlib/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, 10, 0
PRODUCTVERSION 1, 2, 10, 0
FILEVERSION 1, 2, 11, 0
PRODUCTVERSION 1, 2, 11, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,7 +17,7 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.10\0"
VALUE "FileVersion", "1.2.11\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
Expand Down
6 changes: 3 additions & 3 deletions zlib/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, 10, 0
PRODUCTVERSION 1, 2, 10, 0
FILEVERSION 1, 2, 11, 0
PRODUCTVERSION 1, 2, 11, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,7 +17,7 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.10\0"
VALUE "FileVersion", "1.2.11\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
Expand Down
4 changes: 0 additions & 4 deletions zlib/contrib/vstudio/vc14/miniunz.vcxproj.user

This file was deleted.

4 changes: 0 additions & 4 deletions zlib/contrib/vstudio/vc14/minizip.vcxproj.user

This file was deleted.

4 changes: 0 additions & 4 deletions zlib/contrib/vstudio/vc14/testzlib.vcxproj.user

This file was deleted.

4 changes: 0 additions & 4 deletions zlib/contrib/vstudio/vc14/testzlibdll.vcxproj.user

This file was deleted.

6 changes: 3 additions & 3 deletions zlib/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, 10, 0
PRODUCTVERSION 1, 2, 10, 0
FILEVERSION 1, 2, 11, 0
PRODUCTVERSION 1, 2, 11, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,7 +17,7 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.10\0"
VALUE "FileVersion", "1.2.11\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
Expand Down
4 changes: 0 additions & 4 deletions zlib/contrib/vstudio/vc14/zlibstat.vcxproj.user

This file was deleted.

4 changes: 0 additions & 4 deletions zlib/contrib/vstudio/vc14/zlibvc.vcxproj.user

This file was deleted.

6 changes: 3 additions & 3 deletions zlib/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, 10, 0
PRODUCTVERSION 1, 2, 10, 0
FILEVERSION 1, 2, 11, 0
PRODUCTVERSION 1, 2, 11, 0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS 0
FILEOS VOS_DOS_WINDOWS32
Expand All @@ -17,7 +17,7 @@ BEGIN

BEGIN
VALUE "FileDescription", "zlib data compression and ZIP file I/O library\0"
VALUE "FileVersion", "1.2.10\0"
VALUE "FileVersion", "1.2.11\0"
VALUE "InternalName", "zlib\0"
VALUE "OriginalFilename", "zlibwapi.dll\0"
VALUE "ProductName", "ZLib.DLL\0"
Expand Down
19 changes: 12 additions & 7 deletions zlib/deflate.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
#include "deflate.h"

const char deflate_copyright[] =
" deflate 1.2.10 Copyright 1995-2017 Jean-loup Gailly and Mark Adler ";
" deflate 1.2.11 Copyright 1995-2017 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 Expand Up @@ -586,7 +586,8 @@ int ZEXPORT deflateParams(strm, level, strategy)
}
func = configuration_table[s->level].func;

if ((strategy != s->strategy || func != configuration_table[level].func)) {
if ((strategy != s->strategy || func != configuration_table[level].func) &&
s->high_water) {
/* Flush the last buffer: */
int err = deflate(strm, Z_BLOCK);
if (err == Z_STREAM_ERROR)
Expand Down Expand Up @@ -1671,8 +1672,6 @@ local block_state deflate_stored(s, flush)
len = left + s->strm->avail_in; /* limit len to the input */
if (len > have)
len = have; /* limit len to the output */
if (left > len)
left = len; /* limit window pull to len */

/* If the stored block would be less than min_block in length, or if
* unable to copy all of the available input when flushing, then try
Expand All @@ -1681,13 +1680,13 @@ local block_state deflate_stored(s, flush)
*/
if (len < min_block && ((len == 0 && flush != Z_FINISH) ||
flush == Z_NO_FLUSH ||
len - left != s->strm->avail_in))
len != left + s->strm->avail_in))
break;

/* Make a dummy stored block in pending to get the header bytes,
* including any pending bits. This also updates the debugging counts.
*/
last = flush == Z_FINISH && len - left == s->strm->avail_in ? 1 : 0;
last = flush == Z_FINISH && len == left + s->strm->avail_in ? 1 : 0;
_tr_stored_block(s, (char *)0, 0L, last);

/* Replace the lengths in the dummy stored block with len. */
Expand All @@ -1699,14 +1698,16 @@ local block_state deflate_stored(s, flush)
/* Write the stored block header bytes. */
flush_pending(s->strm);

/* Update debugging counts for the data about to be copied. */
#ifdef ZLIB_DEBUG
/* Update debugging counts for the data about to be copied. */
s->compressed_len += len << 3;
s->bits_sent += len << 3;
#endif

/* Copy uncompressed bytes from the window to next_out. */
if (left) {
if (left > len)
left = len;
zmemcpy(s->strm->next_out, s->window + s->block_start, left);
s->strm->next_out += left;
s->strm->avail_out -= left;
Expand Down Expand Up @@ -1756,6 +1757,8 @@ local block_state deflate_stored(s, flush)
s->block_start = s->strstart;
s->insert += MIN(used, s->w_size - s->insert);
}
if (s->high_water < s->strstart)
s->high_water = s->strstart;

/* If the last block was written to next_out, then done. */
if (last)
Expand Down Expand Up @@ -1783,6 +1786,8 @@ local block_state deflate_stored(s, flush)
read_buf(s->strm, s->window + s->strstart, have);
s->strstart += have;
}
if (s->high_water < s->strstart)
s->high_water = s->strstart;

/* There was not enough avail_out to write a complete worthy or flushed
* stored block to next_out. Write a stored block to pending instead, if we
Expand Down
2 changes: 1 addition & 1 deletion zlib/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, 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 zlib/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, 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 zlib/inffast.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* inffast.c -- fast decoding
* Copyright (C) 1995-2008, 2010, 2013, 2016 Mark Adler
* Copyright (C) 1995-2017 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
*/

Expand Down
4 changes: 2 additions & 2 deletions zlib/inftrees.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define MAXBITS 15

const char inflate_copyright[] =
" inflate 1.2.10 Copyright 1995-2017 Mark Adler ";
" inflate 1.2.11 Copyright 1995-2017 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, 192, 202};
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 77, 202};
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 zlib/os400/README400
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ZLIB version 1.2.10 for OS/400 installation instructions
ZLIB version 1.2.11 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
2 changes: 1 addition & 1 deletion zlib/os400/make.sh
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ fi
echo '#pragma comment(user, "ZLIB version '"${VERSION}"'")' > os400.c
echo '#pragma comment(user, __DATE__)' >> os400.c
echo '#pragma comment(user, __TIME__)' >> os400.c
echo '#pragma comment(copyright, "Copyright (C) 1995-2016 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c
echo '#pragma comment(copyright, "Copyright (C) 1995-2017 Jean-Loup Gailly, Mark Adler. OS/400 version by P. Monnerat.")' >> os400.c
make_module OS400 os400.c
LINK= # No need to rebuild service program yet.
MODULES=
Expand Down
Loading

0 comments on commit 0f314c7

Please sign in to comment.