MCPcopy Create free account
hub / github.com/F-Stack/f-stack / gz_reset

Function gz_reset

freebsd/contrib/zstd/zlibWrapper/gzlib.c:78–91  ·  view source on GitHub ↗

Reset gzip file state */

(state)

Source from the content-addressed store, hash-verified

76
77/* Reset gzip file state */
78local 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. */
94local gzFile gz_open(path, fd, mode)

Callers 2

gz_openFunction · 0.70
gzrewindFunction · 0.70

Calls 1

gz_errorFunction · 0.70

Tested by

no test coverage detected