用来压缩和解压的,以下是部分函数:
int compress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
int compress2 (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen, int level);
int uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen);
typedef voidp gzFile;
gzFile gzopen (const char *path, const char *mode);
gzFile gzdopen (int fd, const char *mode);
int gzsetparams (gzFile file, int level, int strategy);
int gzread (gzFile file, voidp buf, unsigned len);
int gzwrite (gzFile file, const voidp buf, unsigned len);
int VA gzprintf (gzFile file, const char *format, ...);
int gzputs (gzFile file, const char *s);
char * gzgets (gzFile file, char *buf, int len);
int gzputc (gzFile file, int c);
int gzgetc (gzFile file);
int gzflush (gzFile file, int flush);
z_off_t gzseek (gzFile file, z_off_t offset, int whence);
z_off_t gztell (gzFile file);
int gzrewind (gzFile file);
int gzeof (gzFile file);
int gzclose (gzFile file);
const char * gzerror (gzFile file, int *errnum);