Skip to content

Commit a00d6ad

Browse files
[release/7.0-staging] Zlib: Update zlib to v1.2.13, intel-zlib to v1.2.13_jtk (#89517)
* Update zlib -> 1.2.13 * Update intel zlib -> 1.2.13_jtk * Revert readme, cherry-pick changes * Delete zlib.3.pdf * Update zlib version text files. --------- Co-authored-by: Levi Broderick <levib@microsoft.com> Co-authored-by: Levi Broderick <GrabYourPitchforks@users.noreply.github.com>
1 parent 028dc4f commit a00d6ad

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+720
-535
lines changed

THIRD-PARTY-NOTICES.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ https://github.com/madler/zlib
7373
https://zlib.net/zlib_license.html
7474

7575
/* zlib.h -- interface of the 'zlib' general purpose compression library
76-
version 1.2.12, March 27th, 2022
76+
version 1.2.13, October 13th, 2022
7777

7878
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
7979

src/installer/pkg/THIRD-PARTY-NOTICES.TXT

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ https://github.com/madler/zlib
7272
https://zlib.net/zlib_license.html
7373

7474
/* zlib.h -- interface of the 'zlib' general purpose compression library
75-
version 1.2.12, March 27th, 2022
75+
version 1.2.13, October 13th, 2022
7676

7777
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
7878

src/native/external/cgmanifest.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
"Type": "git",
4646
"Git": {
4747
"RepositoryUrl": "https://github.com/madler/zlib",
48-
"CommitHash": "21767c654d31d2dccdde4330529775c6c5fd5389"
48+
"CommitHash": "04f42ceca40f73e2978b50e93806c2a18c1281fc"
4949
}
5050
},
5151
"DevelopmentDependency": false
@@ -54,8 +54,8 @@
5454
"Component": {
5555
"Type": "git",
5656
"Git": {
57-
"RepositoryUrl": "https://github.com/jtkukunas/zlib",
58-
"CommitHash": "bf55d56b068467329f5a6f29bee31bc80d694023"
57+
"RepositoryUrl": "https://github.com/intel/zlib",
58+
"CommitHash": "6160a8f20c3626aec2f8b0fda5bf2e65bfe31781"
5959
}
6060
},
6161
"DevelopmentDependency": false
Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
v1.2.12_jtk.1
2-
(bf55d56b068467329f5a6f29bee31bc80d694023)
1+
v1.2.13_jtk
2+
(6160a8f20c3626aec2f8b0fda5bf2e65bfe31781)
33

4-
https://github.com/jtkukunas/zlib/releases/tag/v1.2.12_jtk.1
4+
https://github.com/intel/zlib/releases/tag/v1.2.13_jtk
55

66
Note: This library does not use a standard release lifecycle.
7-
We're pointing to the latest available tagged version at the time we forked the code.
8-
9-
We have also cherry-picked into our local copy:
10-
https://github.com/madler/zlib/commit/7ecf7c7458578d05a20fa481436dd5c58db112f7
11-
12-
And applied by hand the deflate_quick.c change from this commit:
13-
https://github.com/dotnet/runtime/commit/60f6129b3eaef088f4b1ddc30d3320a68f396d85
7+
We're pointing to the latest available tagged version as of this writing.
8+
9+
We do not pull in every file from the intel/zlib repo. Instead, some years ago,
10+
somebody determined what they believed was the minimum set that needed to be
11+
copied into our repo in order to build. Since then, we've just updated only
12+
those files in-place, ignoring other files in the intel/zlib repo. If new files
13+
are introduced which are necessary for building the product, feel free to bring
14+
those down as well.

src/native/external/zlib-intel/compress.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
memory, Z_BUF_ERROR if there was not enough room in the output buffer,
2020
Z_STREAM_ERROR if the level parameter is invalid.
2121
*/
22-
int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
22+
int ZEXPORT compress2(dest, destLen, source, sourceLen, level)
2323
Bytef *dest;
2424
uLongf *destLen;
2525
const Bytef *source;
@@ -65,7 +65,7 @@ int ZEXPORT compress2 (dest, destLen, source, sourceLen, level)
6565

6666
/* ===========================================================================
6767
*/
68-
int ZEXPORT compress (dest, destLen, source, sourceLen)
68+
int ZEXPORT compress(dest, destLen, source, sourceLen)
6969
Bytef *dest;
7070
uLongf *destLen;
7171
const Bytef *source;
@@ -78,7 +78,7 @@ int ZEXPORT compress (dest, destLen, source, sourceLen)
7878
If the default memLevel or windowBits for deflateInit() is changed, then
7979
this function needs to be updated.
8080
*/
81-
uLong ZEXPORT compressBound (sourceLen)
81+
uLong ZEXPORT compressBound(sourceLen)
8282
uLong sourceLen;
8383
{
8484
return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) +

src/native/external/zlib-intel/crc32.c

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,13 +98,22 @@
9898
# endif
9999
#endif
100100

101+
/* If available, use the ARM processor CRC32 instruction. */
102+
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
103+
# define ARMCRC32
104+
#endif
105+
101106
/* Local functions. */
102107
local z_crc_t multmodp OF((z_crc_t a, z_crc_t b));
103108
local z_crc_t x2nmodp OF((z_off64_t n, unsigned k));
104109

105-
/* If available, use the ARM processor CRC32 instruction. */
106-
#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8
107-
# define ARMCRC32
110+
#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
111+
local z_word_t byte_swap OF((z_word_t word));
112+
#endif
113+
114+
#if defined(W) && !defined(ARMCRC32)
115+
local z_crc_t crc_word OF((z_word_t data));
116+
local z_word_t crc_word_big OF((z_word_t data));
108117
#endif
109118

110119
#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE))
@@ -645,8 +654,8 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
645654
len &= 7;
646655

647656
/* Do three interleaved CRCs to realize the throughput of one crc32x
648-
instruction per cycle. Each CRC is calcuated on Z_BATCH words. The three
649-
CRCs are combined into a single CRC after each set of batches. */
657+
instruction per cycle. Each CRC is calculated on Z_BATCH words. The
658+
three CRCs are combined into a single CRC after each set of batches. */
650659
while (num >= 3 * Z_BATCH) {
651660
crc1 = 0;
652661
crc2 = 0;
@@ -1107,7 +1116,7 @@ uLong ZEXPORT crc32_combine_gen(len2)
11071116
}
11081117

11091118
/* ========================================================================= */
1110-
uLong crc32_combine_op(crc1, crc2, op)
1119+
uLong ZEXPORT crc32_combine_op(crc1, crc2, op)
11111120
uLong crc1;
11121121
uLong crc2;
11131122
uLong op;

0 commit comments

Comments
 (0)