Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 57a38c8

Browse filesBrowse files
nodejs-github-botrichardlau
authored andcommitted
deps: update zlib to 1.3.0.1-motley-dd5fc13
PR-URL: #51105 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
1 parent b0ca084 commit 57a38c8
Copy full SHA for 57a38c8

File tree

Expand file treeCollapse file tree

12 files changed

+85
-20
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

12 files changed

+85
-20
lines changed
Open diff view settings
Collapse file

‎deps/zlib/CMakeLists.txt‎

Copy file name to clipboardExpand all lines: deps/zlib/CMakeLists.txt
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)
33

44
project(zlib C)
55

6-
set(VERSION "1.3")
6+
set(VERSION "1.3.0.1")
77

88
set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables")
99
set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries")
Collapse file

‎deps/zlib/README.chromium‎

Copy file name to clipboardExpand all lines: deps/zlib/README.chromium
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
Name: zlib
22
Short Name: zlib
33
URL: http://zlib.net/
4-
Version: 1.2.13
5-
CPEPrefix: cpe:/a:zlib:zlib:1.2.13
4+
Version: 1.3.0.1
5+
CPEPrefix: cpe:/a:zlib:zlib:1.3.0.1
66
Security Critical: yes
77
Shipped: yes
88
License: Zlib
Collapse file

‎deps/zlib/contrib/minizip/README.chromium‎

Copy file name to clipboardExpand all lines: deps/zlib/contrib/minizip/README.chromium
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ License: Zlib
66
License File: //third_party/zlib/LICENSE
77
Security Critical: yes
88
Shipped: yes
9+
CPEPrefix: cpe:/a:minizip_project:minizip
910

1011
Description:
1112
Minizip provides API on top of zlib that can enumerate and extract ZIP archive
Collapse file

‎deps/zlib/contrib/optimizations/inflate.c‎

Copy file name to clipboardExpand all lines: deps/zlib/contrib/optimizations/inflate.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1422,7 +1422,7 @@ int ZEXPORT inflateSync(z_streamp strm) {
14221422
/* if first time, start search in bit buffer */
14231423
if (state->mode != SYNC) {
14241424
state->mode = SYNC;
1425-
state->hold <<= state->bits & 7;
1425+
state->hold >>= state->bits & 7;
14261426
state->bits -= state->bits & 7;
14271427
len = 0;
14281428
while (state->bits >= 8) {
Collapse file

‎deps/zlib/deflate.c‎

Copy file name to clipboardExpand all lines: deps/zlib/deflate.c
+22-1Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
#endif
6666

6767
const char deflate_copyright[] =
68-
" deflate 1.3 Copyright 1995-2023 Jean-loup Gailly and Mark Adler ";
68+
" deflate 1.3.0.1 Copyright 1995-2023 Jean-loup Gailly and Mark Adler ";
6969
/*
7070
If you use the zlib library in a product, an acknowledgment is welcome
7171
in the documentation of your product. If for some reason you cannot
@@ -531,7 +531,11 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
531531
* the compressed data for a dynamic block also cannot overwrite the
532532
* symbols from which it is being constructed.
533533
*/
534+
#ifdef LIT_MEM
535+
s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 5);
536+
#else
534537
s->pending_buf = (uchf *) ZALLOC(strm, s->lit_bufsize, 4);
538+
#endif
535539
s->pending_buf_size = (ulg)s->lit_bufsize * 4;
536540

537541
if (s->window == Z_NULL || s->prev == Z_NULL || s->head == Z_NULL ||
@@ -541,8 +545,14 @@ int ZEXPORT deflateInit2_(z_streamp strm, int level, int method,
541545
deflateEnd (strm);
542546
return Z_MEM_ERROR;
543547
}
548+
#ifdef LIT_MEM
549+
s->d_buf = (ushf *)(s->pending_buf + (s->lit_bufsize << 1));
550+
s->l_buf = s->pending_buf + (s->lit_bufsize << 2);
551+
s->sym_end = s->lit_bufsize - 1;
552+
#else
544553
s->sym_buf = s->pending_buf + s->lit_bufsize;
545554
s->sym_end = (s->lit_bufsize - 1) * 3;
555+
#endif
546556
/* We avoid equality with lit_bufsize*3 because of wraparound at 64K
547557
* on 16 bit machines and because stored blocks are restricted to
548558
* 64K-1 bytes.
@@ -754,9 +764,15 @@ int ZEXPORT deflatePrime(z_streamp strm, int bits, int value) {
754764

755765
if (deflateStateCheck(strm)) return Z_STREAM_ERROR;
756766
s = strm->state;
767+
#ifdef LIT_MEM
768+
if (bits < 0 || bits > 16 ||
769+
(uchf *)s->d_buf < s->pending_out + ((Buf_size + 7) >> 3))
770+
return Z_BUF_ERROR;
771+
#else
757772
if (bits < 0 || bits > 16 ||
758773
s->sym_buf < s->pending_out + ((Buf_size + 7) >> 3))
759774
return Z_BUF_ERROR;
775+
#endif
760776
do {
761777
put = Buf_size - s->bi_valid;
762778
if (put > bits)
@@ -1343,7 +1359,12 @@ int ZEXPORT deflateCopy(z_streamp dest, z_streamp source) {
13431359
zmemcpy(ds->pending_buf, ss->pending_buf, (uInt)ds->pending_buf_size);
13441360

13451361
ds->pending_out = ds->pending_buf + (ss->pending_out - ss->pending_buf);
1362+
#ifdef LIT_MEM
1363+
ds->d_buf = (ushf *)(ds->pending_buf + (ds->lit_bufsize << 1));
1364+
ds->l_buf = ds->pending_buf + (ds->lit_bufsize << 2);
1365+
#else
13461366
ds->sym_buf = ds->pending_buf + ds->lit_bufsize;
1367+
#endif
13471368

13481369
ds->l_desc.dyn_tree = ds->dyn_ltree;
13491370
ds->d_desc.dyn_tree = ds->dyn_dtree;
Collapse file

‎deps/zlib/deflate.h‎

Copy file name to clipboardExpand all lines: deps/zlib/deflate.h
+30-1Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,10 @@
2323
# define GZIP
2424
#endif
2525

26+
/* define LIT_MEM to slightly increase the speed of deflate (order 1% to 2%) at
27+
the cost of a larger memory footprint */
28+
/* #define LIT_MEM */
29+
2630
/* ===========================================================================
2731
* Internal compression state.
2832
*/
@@ -217,7 +221,12 @@ typedef struct internal_state {
217221
/* Depth of each subtree used as tie breaker for trees of equal frequency
218222
*/
219223

224+
#ifdef LIT_MEM
225+
ushf *d_buf; /* buffer for distances */
226+
uchf *l_buf; /* buffer for literals/lengths */
227+
#else
220228
uchf *sym_buf; /* buffer for distances and literals/lengths */
229+
#endif
221230

222231
uInt lit_bufsize;
223232
/* Size of match buffer for literals/lengths. There are 4 reasons for
@@ -239,7 +248,7 @@ typedef struct internal_state {
239248
* - I can't count above 4
240249
*/
241250

242-
uInt sym_next; /* running index in sym_buf */
251+
uInt sym_next; /* running index in symbol buffer */
243252
uInt sym_end; /* symbol table full when sym_next reaches this */
244253

245254
ulg opt_len; /* bit length of current block with optimal trees */
@@ -323,6 +332,25 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
323332
extern const uch ZLIB_INTERNAL _dist_code[];
324333
#endif
325334

335+
#ifdef LIT_MEM
336+
# define _tr_tally_lit(s, c, flush) \
337+
{ uch cc = (c); \
338+
s->d_buf[s->sym_next] = 0; \
339+
s->l_buf[s->sym_next++] = cc; \
340+
s->dyn_ltree[cc].Freq++; \
341+
flush = (s->sym_next == s->sym_end); \
342+
}
343+
# define _tr_tally_dist(s, distance, length, flush) \
344+
{ uch len = (uch)(length); \
345+
ush dist = (ush)(distance); \
346+
s->d_buf[s->sym_next] = dist; \
347+
s->l_buf[s->sym_next++] = len; \
348+
dist--; \
349+
s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \
350+
s->dyn_dtree[d_code(dist)].Freq++; \
351+
flush = (s->sym_next == s->sym_end); \
352+
}
353+
#else
326354
# define _tr_tally_lit(s, c, flush) \
327355
{ uch cc = (c); \
328356
s->sym_buf[s->sym_next++] = 0; \
@@ -342,6 +370,7 @@ void ZLIB_INTERNAL _tr_stored_block(deflate_state *s, charf *buf,
342370
s->dyn_dtree[d_code(dist)].Freq++; \
343371
flush = (s->sym_next == s->sym_end); \
344372
}
373+
#endif
345374
#else
346375
# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c)
347376
# define _tr_tally_dist(s, distance, length, flush) \
Collapse file

‎deps/zlib/inflate.c‎

Copy file name to clipboardExpand all lines: deps/zlib/inflate.c
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1389,7 +1389,7 @@ int ZEXPORT inflateSync(z_streamp strm) {
13891389
/* if first time, start search in bit buffer */
13901390
if (state->mode != SYNC) {
13911391
state->mode = SYNC;
1392-
state->hold <<= state->bits & 7;
1392+
state->hold >>= state->bits & 7;
13931393
state->bits -= state->bits & 7;
13941394
len = 0;
13951395
while (state->bits >= 8) {
Collapse file

‎deps/zlib/inftrees.c‎

Copy file name to clipboardExpand all lines: deps/zlib/inftrees.c
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
#define MAXBITS 15
1010

1111
const char inflate_copyright[] =
12-
" inflate 1.3 Copyright 1995-2023 Mark Adler ";
12+
" inflate 1.3.0.1 Copyright 1995-2023 Mark Adler ";
1313
/*
1414
If you use the zlib library in a product, an acknowledgment is welcome
1515
in the documentation of your product. If for some reason you cannot
@@ -57,7 +57,7 @@ int ZLIB_INTERNAL inflate_table(codetype type, unsigned short FAR *lens,
5757
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0};
5858
static const unsigned short lext[31] = { /* Length codes 257..285 extra */
5959
16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18,
60-
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 198, 203};
60+
19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 70, 200};
6161
static const unsigned short dbase[32] = { /* Distance codes 0..29 base */
6262
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
6363
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
Collapse file

‎deps/zlib/trees.c‎

Copy file name to clipboardExpand all lines: deps/zlib/trees.c
+16-2Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -899,14 +899,19 @@ local void compress_block(deflate_state *s, const ct_data *ltree,
899899
const ct_data *dtree) {
900900
unsigned dist; /* distance of matched string */
901901
int lc; /* match length or unmatched char (if dist == 0) */
902-
unsigned sx = 0; /* running index in sym_buf */
902+
unsigned sx = 0; /* running index in symbol buffers */
903903
unsigned code; /* the code to send */
904904
int extra; /* number of extra bits to send */
905905

906906
if (s->sym_next != 0) do {
907+
#ifdef LIT_MEM
908+
dist = s->d_buf[sx];
909+
lc = s->l_buf[sx++];
910+
#else
907911
dist = s->sym_buf[sx++] & 0xff;
908912
dist += (unsigned)(s->sym_buf[sx++] & 0xff) << 8;
909913
lc = s->sym_buf[sx++];
914+
#endif
910915
if (dist == 0) {
911916
send_code(s, lc, ltree); /* send a literal byte */
912917
Tracecv(isgraph(lc), (stderr," '%c' ", lc));
@@ -931,8 +936,12 @@ local void compress_block(deflate_state *s, const ct_data *ltree,
931936
}
932937
} /* literal or match pair ? */
933938

934-
/* Check that the overlay between pending_buf and sym_buf is ok: */
939+
/* Check for no overlay of pending_buf on needed symbols */
940+
#ifdef LIT_MEM
941+
Assert(s->pending < (s->lit_bufsize << 1) + sx, "pendingBuf overflow");
942+
#else
935943
Assert(s->pending < s->lit_bufsize + sx, "pendingBuf overflow");
944+
#endif
936945

937946
} while (sx < s->sym_next);
938947

@@ -1082,9 +1091,14 @@ void ZLIB_INTERNAL _tr_flush_block(deflate_state *s, charf *buf,
10821091
* the current block must be flushed.
10831092
*/
10841093
int ZLIB_INTERNAL _tr_tally(deflate_state *s, unsigned dist, unsigned lc) {
1094+
#ifdef LIT_MEM
1095+
s->d_buf[s->sym_next] = (ush)dist;
1096+
s->l_buf[s->sym_next++] = (uch)lc;
1097+
#else
10851098
s->sym_buf[s->sym_next++] = (uch)dist;
10861099
s->sym_buf[s->sym_next++] = (uch)(dist >> 8);
10871100
s->sym_buf[s->sym_next++] = (uch)lc;
1101+
#endif
10881102
if (dist == 0) {
10891103
/* lc is the unmatched char */
10901104
s->dyn_ltree[lc].Freq++;
Collapse file

‎deps/zlib/zlib.3‎

Copy file name to clipboardExpand all lines: deps/zlib/zlib.3
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
.TH ZLIB 3 "xx Oct 2022"
1+
.TH ZLIB 3 "xx Aug 2023"
22
.SH NAME
33
zlib \- compression/decompression library
44
.SH SYNOPSIS
@@ -105,7 +105,7 @@ before asking for help.
105105
Send questions and/or comments to zlib@gzip.org,
106106
or (for the Windows DLL version) to Gilles Vollant (info@winimage.com).
107107
.SH AUTHORS AND LICENSE
108-
Version 1.2.13.1
108+
Version 1.2.3.0.1
109109
.LP
110110
Copyright (C) 1995-2022 Jean-loup Gailly and Mark Adler
111111
.LP

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.