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