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