MCPcopy Create free account
hub / github.com/MariaDB/server / inflatePrime

Function inflatePrime

zlib/inflate.c:219–236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219int ZEXPORT inflatePrime(z_streamp strm, int bits, int value) {
220 struct inflate_state FAR *state;
221
222 if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
223 if (bits == 0)
224 return Z_OK;
225 state = (struct inflate_state FAR *)strm->state;
226 if (bits < 0) {
227 state->hold = 0;
228 state->bits = 0;
229 return Z_OK;
230 }
231 if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
232 value &= (1L << bits) - 1;
233 state->hold += (unsigned long)value << state->bits;
234 state->bits += (uInt)bits;
235 return Z_OK;
236}
237
238/*
239 Update the window with the last wsize (normally 32K) bytes written before

Callers

nothing calls this directly

Calls 1

inflateStateCheckFunction · 0.85

Tested by

no test coverage detected