MCPcopy Create free account
hub / github.com/F-Stack/f-stack / inflatePrime

Function inflatePrime

freebsd/contrib/zlib/inflate.c:247–266  ·  view source on GitHub ↗
(strm, bits, value)

Source from the content-addressed store, hash-verified

245}
246
247int ZEXPORT inflatePrime(strm, bits, value)
248z_streamp strm;
249int bits;
250int value;
251{
252 struct inflate_state FAR *state;
253
254 if (inflateStateCheck(strm)) return Z_STREAM_ERROR;
255 state = (struct inflate_state FAR *)strm->state;
256 if (bits < 0) {
257 state->hold = 0;
258 state->bits = 0;
259 return Z_OK;
260 }
261 if (bits > 16 || state->bits + (uInt)bits > 32) return Z_STREAM_ERROR;
262 value &= (1L << bits) - 1;
263 state->hold += (unsigned)value << state->bits;
264 state->bits += (uInt)bits;
265 return Z_OK;
266}
267
268/*
269 Return state with length and distance decoding tables and index sizes set to

Callers 3

zstd_zlibwrapper.cFile · 0.85
cover_supportFunction · 0.85
cover_wrapFunction · 0.85

Calls 1

inflateStateCheckFunction · 0.85

Tested by 2

cover_supportFunction · 0.68
cover_wrapFunction · 0.68