| 245 | } |
| 246 | |
| 247 | int ZEXPORT inflatePrime(strm, bits, value) |
| 248 | z_streamp strm; |
| 249 | int bits; |
| 250 | int 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 |