| 217 | } |
| 218 | |
| 219 | int 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 |
nothing calls this directly
no test coverage detected