Skip to content

Commit 6aa7216

Browse files
committed
8324632: Update Zlib Data Compression Library to Version 1.3.1
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 Backport-of: 6359b2843f83852561b925d3f1315eed5f4b9cda
1 parent f8225a4 commit 6aa7216

26 files changed

+1183
-1610
lines changed

src/java.base/share/legal/zlib.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
## zlib v1.2.13
1+
## zlib v1.3.1
22

33
### zlib License
44
<pre>
55

6-
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
6+
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
77

88
This software is provided 'as-is', without any express or implied
99
warranty. In no event will the authors be held liable for any damages

src/java.base/share/native/libzip/zlib/ChangeLog

+159-56
Large diffs are not rendered by default.

src/java.base/share/native/libzip/zlib/README

+9-10
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ZLIB DATA COMPRESSION LIBRARY
22

3-
zlib 1.2.13 is a general purpose data compression library. All the code is
3+
zlib 1.3.1 is a general purpose data compression library. All the code is
44
thread safe. The data format used by the zlib library is described by RFCs
55
(Request for Comments) 1950 to 1952 in the files
66
http://tools.ietf.org/html/rfc1950 (zlib format), rfc1951 (deflate format) and
@@ -29,18 +29,17 @@ PLEASE read the zlib FAQ http://zlib.net/zlib_faq.html before asking for help.
2929

3030
Mark Nelson <markn@ieee.org> wrote an article about zlib for the Jan. 1997
3131
issue of Dr. Dobb's Journal; a copy of the article is available at
32-
http://marknelson.us/1997/01/01/zlib-engine/ .
32+
https://marknelson.us/posts/1997/01/01/zlib-engine.html .
3333

34-
The changes made in version 1.2.13 are documented in the file ChangeLog.
34+
The changes made in version 1.3.1 are documented in the file ChangeLog.
3535

3636
Unsupported third party contributions are provided in directory contrib/ .
3737

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

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

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

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

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

8584
Copyright notice:
8685

87-
(C) 1995-2022 Jean-loup Gailly and Mark Adler
86+
(C) 1995-2024 Jean-loup Gailly and Mark Adler
8887

8988
This software is provided 'as-is', without any express or implied
9089
warranty. In no event will the authors be held liable for any damages

src/java.base/share/native/libzip/zlib/compress.c

+5-16
Original file line numberDiff line numberDiff line change
@@ -43,13 +43,8 @@
4343
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
4444
Z_STREAM_ERROR if the level parameter is invalid.
4545
*/
46-
int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
47-
Bytef *dest;
48-
uLongf *destLen;
49-
const Bytef *source;
50-
uLong sourceLen;
51-
int level;
52-
{
46+
int ZEXPORT compress2(Bytef *dest, uLongf *destLen, const Bytef *source,
47+
uLong sourceLen, int level) {
5348
z_stream stream;
5449
int err;
5550
const uInt max = (uInt)-1;
@@ -89,22 +84,16 @@ int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
8984

9085
/* ===========================================================================
9186
*/
92-
int ZEXPORT compress(dest, destLen, source, sourceLen)
93-
Bytef *dest;
94-
uLongf *destLen;
95-
const Bytef *source;
96-
uLong sourceLen;
97-
{
87+
int ZEXPORT compress(Bytef *dest, uLongf *destLen, const Bytef *source,
88+
uLong sourceLen) {
9889
return compress2(dest, destLen, source, sourceLen, Z_DEFAULT_COMPRESSION);
9990
}
10091

10192
/* ===========================================================================
10293
If the default memLevel or windowBits for deflateInit() is changed, then
10394
this function needs to be updated.
10495
*/
105-
uLong ZEXPORT compressBound(sourceLen)
106-
uLong sourceLen;
107-
{
96+
uLong ZEXPORT compressBound(uLong sourceLen) {
10897
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +
10998
(sourceLen >> 25) + 13;
11099
}

0 commit comments

Comments
 (0)