Skip to content

Commit

Permalink
8324632: Update Zlib Data Compression Library to Version 1.3.1
Browse files Browse the repository at this point in the history
8315117: Update Zlib Data Compression Library to Version 1.3
8326351: Update the Zlib version in open/src/java.base/share/legal/zlib.md to 1.3.1

Reviewed-by: sgehwolf, andrew
Backport-of: 6aa721649d870354a79c3508343b14222e0edcfb
  • Loading branch information
fitzsim authored and gnu-andrew committed Jun 12, 2024
1 parent 61dde50 commit 0357abb
Show file tree
Hide file tree
Showing 33 changed files with 1,205 additions and 1,632 deletions.
6 changes: 3 additions & 3 deletions THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -3043,14 +3043,14 @@ performance, or use of this material.

-------------------------------------------------------------------------------

%% This notice is provided with respect to zlib v1.2.13, which may be included
%% This notice is provided with respect to zlib v1.3.1, which may be included
with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---

version 1.2.13, October 13th, 2022
version 1.3.1, January 22, 2024

Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 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
6 changes: 3 additions & 3 deletions corba/THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -3043,14 +3043,14 @@ performance, or use of this material.

-------------------------------------------------------------------------------

%% This notice is provided with respect to zlib v1.2.11, which may be included
%% This notice is provided with respect to zlib v1.3.1, which may be included
with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---

version 1.2.11, January 15th, 2017
version 1.3.1, January 22, 2024

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 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
6 changes: 3 additions & 3 deletions hotspot/THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -3043,14 +3043,14 @@ performance, or use of this material.

-------------------------------------------------------------------------------

%% This notice is provided with respect to zlib v1.2.11, which may be included
%% This notice is provided with respect to zlib v1.3.1, which may be included
with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---

version 1.2.11, January 15th, 2017
version 1.3.1, January 22, 2024

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 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
6 changes: 3 additions & 3 deletions jaxp/THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -3043,14 +3043,14 @@ performance, or use of this material.

-------------------------------------------------------------------------------

%% This notice is provided with respect to zlib v1.2.11, which may be included
%% This notice is provided with respect to zlib v1.3.1, which may be included
with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---

version 1.2.11, January 15th, 2017
version 1.3.1, January 22, 2024

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 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
6 changes: 3 additions & 3 deletions jaxws/THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -3043,14 +3043,14 @@ performance, or use of this material.

-------------------------------------------------------------------------------

%% This notice is provided with respect to zlib v1.2.11, which may be included
%% This notice is provided with respect to zlib v1.3.1, which may be included
with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---

version 1.2.11, January 15th, 2017
version 1.3.1, January 22, 2024

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 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
6 changes: 3 additions & 3 deletions jdk/THIRD_PARTY_README
Original file line number Diff line number Diff line change
Expand Up @@ -3043,14 +3043,14 @@ performance, or use of this material.

-------------------------------------------------------------------------------

%% This notice is provided with respect to zlib v1.2.11, which may be included
%% This notice is provided with respect to zlib v1.3.1, which may be included
with JRE 8, JDK 8, and OpenJDK 8.

--- begin of LICENSE ---

version 1.2.11, January 15th, 2017
version 1.3.1, January 22, 2024

Copyright (C) 1995-2017 Jean-loup Gailly and Mark Adler
Copyright (C) 1995-2024 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
215 changes: 159 additions & 56 deletions jdk/src/share/native/java/util/zip/zlib/ChangeLog

Large diffs are not rendered by default.

19 changes: 9 additions & 10 deletions jdk/src/share/native/java/util/zip/zlib/README
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ZLIB DATA COMPRESSION LIBRARY

zlib 1.2.13 is a general purpose data compression library. All the code is
zlib 1.3.1 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 @@ -29,18 +29,17 @@ PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.

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/ .
https://marknelson.us/posts/1997/01/01/zlib-engine.html .

The changes made in version 1.2.13 are documented in the file ChangeLog.
The changes made in version 1.3.1 are documented in the file ChangeLog.

Unsupported third party contributions are provided in directory contrib/ .

zlib is available in Java using the java.util.zip package, documented at
http://java.sun.com/developer/technicalArticles/Programming/compression/ .
zlib is available in Java using the java.util.zip package. Follow the API
Documentation link at: https://docs.oracle.com/search/?q=java.util.zip .

A Perl interface to zlib written by Paul Marquess <pmqs@cpan.org> is available
at CPAN (Comprehensive Perl Archive Network) sites, including
http://search.cpan.org/~pmqs/IO-Compress-Zlib/ .
A Perl interface to zlib and bzip2 written by Paul Marquess <pmqs@cpan.org>
can be found at https://github.com/pmqs/IO-Compress .

A Python interface to zlib written by A.M. Kuchling <amk@amk.ca> is
available in Python 1.5 and later versions, see
Expand All @@ -64,7 +63,7 @@ Notes for some targets:
- zlib doesn't work with gcc 2.6.3 on a DEC 3000/300LX under OSF/1 2.1 it works
when compiled with cc.

- On Digital Unix 4.0D (formely OSF/1) on AlphaServer, the cc option -std1 is
- On Digital Unix 4.0D (formerly OSF/1) on AlphaServer, the cc option -std1 is
necessary to get gzprintf working correctly. This is done by configure.

- zlib doesn't work on HP-UX 9.05 with some versions of /bin/cc. It works with
Expand All @@ -84,7 +83,7 @@ Acknowledgments:

Copyright notice:

(C) 1995-2022 Jean-loup Gailly and Mark Adler
(C) 1995-2024 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
21 changes: 5 additions & 16 deletions jdk/src/share/native/java/util/zip/zlib/compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,8 @@
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
Z_STREAM_ERROR if the level parameter is invalid.
*/
int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
uLong sourceLen;
int level;
{
int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
uLong sourceLen, int level) {
z_stream stream;
int err;
const uInt max = (uInt)-1;
Expand Down Expand Up @@ -89,22 +84,16 @@ int ZEXPORT compress2(dest, destLen, source, sourceLen, level)

/* ===========================================================================
*/
int ZEXPORT compress(dest, destLen, source, sourceLen)
Bytef *dest;
uLongf *destLen;
const Bytef *source;
uLong sourceLen;
{
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
uLong sourceLen) {
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
}

/* ===========================================================================
If the default memLevel or windowBits for deflateInit() is changed, then
this function needs to be updated.
*/
uLong ZEXPORT compressBound(sourceLen)
uLong sourceLen;
{
uLong ZEXPORT compressBound(uLong sourceLen) {
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
(sourceLen >> 25) + 13;
}
Loading

1 comment on commit 0357abb

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

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

Please sign in to comment.