| 102 | unsigned len)); |
| 103 | |
| 104 | int ZEXPORT inflateResetKeep(z_streamp strm) |
| 105 | { |
| 106 | struct inflate_state FAR *state; |
| 107 | |
| 108 | if (strm == Z_NULL || strm->state == Z_NULL) return Z_STREAM_ERROR; |
| 109 | state = (struct inflate_state FAR *)strm->state; |
| 110 | strm->total_in = strm->total_out = state->total = 0; |
| 111 | strm->msg = Z_NULL; |
| 112 | if (state->wrap) /* to support ill-conceived Java test suite */ |
| 113 | strm->adler = state->wrap & 1; |
| 114 | state->mode = HEAD; |
| 115 | state->last = 0; |
| 116 | state->havedict = 0; |
| 117 | state->dmax = 32768U; |
| 118 | state->head = Z_NULL; |
| 119 | state->hold = 0; |
| 120 | state->bits = 0; |
| 121 | state->lencode = state->distcode = state->next = state->codes; |
| 122 | state->sane = 1; |
| 123 | state->back = -1; |
| 124 | Tracev((stderr, "inflate: reset\n")); |
| 125 | return Z_OK; |
| 126 | } |
| 127 | |
| 128 | int ZEXPORT inflateReset(z_streamp strm) |
| 129 | { |