Reset gzip file state */
(state)
| 76 | |
| 77 | /* Reset gzip file state */ |
| 78 | local void gz_reset(state) |
| 79 | gz_statep state; |
| 80 | { |
| 81 | state.state->x.have = 0; /* no output data available */ |
| 82 | if (state.state->mode == GZ_READ) { /* for reading ... */ |
| 83 | state.state->eof = 0; /* not at end of file */ |
| 84 | state.state->past = 0; /* have not read past end yet */ |
| 85 | state.state->how = LOOK; /* look for gzip header */ |
| 86 | } |
| 87 | state.state->seek = 0; /* no seek request pending */ |
| 88 | gz_error(state, Z_OK, NULL); /* clear error */ |
| 89 | state.state->x.pos = 0; /* no uncompressed data yet */ |
| 90 | state.state->strm.avail_in = 0; /* no input data yet */ |
| 91 | } |
| 92 | |
| 93 | /* Open a gzip file either by name or file descriptor. */ |
| 94 | local gzFile gz_open(path, fd, mode) |