chore(Deps/Zlib): move to Cloudflare fork (#21028)

Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
Grimdhex
2025-02-06 14:41:31 +01:00
committed by GitHub
parent 1cdc7ce56e
commit 994eccebdf
33 changed files with 4313 additions and 12888 deletions
+11 -13
View File
@@ -8,9 +8,7 @@
#include "inflate.h"
#include "inffast.h"
#ifdef ASMINF
# pragma message("Assembler code may have bugs -- use at your own risk")
#else
#ifndef ASMINF
/*
Decode literal, length, and distance codes and write out the resulting
@@ -23,8 +21,8 @@
Entry assumptions:
state->mode == LEN
strm->avail_in >= 6
strm->avail_out >= 258
strm->avail_in >= INFLATE_FAST_MIN_INPUT
strm->avail_out >= INFLATE_FAST_MIN_OUTPUT
start >= strm->avail_out
state->bits < 8
@@ -47,10 +45,7 @@
requires strm->avail_out >= 258 for each loop to avoid checking for
output space.
*/
void ZLIB_INTERNAL inflate_fast(strm, start)
z_streamp strm;
unsigned start; /* inflate()'s starting value for strm->avail_out */
{
void ZLIB_INTERNAL inflate_fast(z_streamp strm, unsigned start) {
struct inflate_state FAR *state;
z_const unsigned char FAR *in; /* local strm->next_in */
z_const unsigned char FAR *last; /* have enough input while in < last */
@@ -80,10 +75,10 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
/* copy state to local variables */
state = (struct inflate_state FAR *)strm->state;
in = strm->next_in;
last = in + (strm->avail_in - 5);
last = in + (strm->avail_in - (INFLATE_FAST_MIN_INPUT - 1));
out = strm->next_out;
beg = out - (start - strm->avail_out);
end = out + (strm->avail_out - 257);
end = out + (strm->avail_out - (INFLATE_FAST_MIN_OUTPUT - 1));
#ifdef INFLATE_STRICT
dmax = state->dmax;
#endif
@@ -298,9 +293,12 @@ unsigned start; /* inflate()'s starting value for strm->avail_out */
/* update state and return */
strm->next_in = in;
strm->next_out = out;
strm->avail_in = (unsigned)(in < last ? 5 + (last - in) : 5 - (in - last));
strm->avail_in = (unsigned)(in < last ?
(INFLATE_FAST_MIN_INPUT - 1) + (last - in) :
(INFLATE_FAST_MIN_INPUT - 1) - (in - last));
strm->avail_out = (unsigned)(out < end ?
257 + (end - out) : 257 - (out - end));
(INFLATE_FAST_MIN_OUTPUT - 1) + (end - out) :
(INFLATE_FAST_MIN_OUTPUT - 1) - (out - end));
state->hold = hold;
state->bits = bits;
return;