MCPcopy Create free account
hub / github.com/Meituan-Dianping/SQLAdvisor / gzrewind

Function gzrewind

zlib/gzio.c:862–879  ·  view source on GitHub ↗

=========================================================================== Rewinds input file. */

(file)

Source from the content-addressed store, hash-verified

860 Rewinds input file.
861*/
862int ZEXPORT gzrewind (file)
863 gzFile file;
864{
865 gz_stream *s = (gz_stream*)file;
866
867 if (s == NULL || s->mode != 'r') return -1;
868
869 s->z_err = Z_OK;
870 s->z_eof = 0;
871 s->back = EOF;
872 s->stream.avail_in = 0;
873 s->stream.next_in = s->inbuf;
874 s->crc = crc32(0L, Z_NULL, 0);
875 if (!s->transparent) (void)inflateReset(&s->stream);
876 s->in = 0;
877 s->out = 0;
878 return fseek(s->file, s->start, SEEK_SET);
879}
880
881/* ===========================================================================
882 Returns the starting position for the next gzread or gzwrite on the

Callers 1

ZEXPORTFunction · 0.85

Calls 2

crc32Function · 0.85
inflateResetFunction · 0.85

Tested by

no test coverage detected