/* gzclose() is in a separate file so that it is linked in only if it is used.
That way the other gzclose functions can be used instead to avoid linking in
unneeded compression or decompression routines. */
-int ZEXPORT gzclose(gzFile file)
-{
+int ZEXPORT gzclose(gzFile file) {
#ifndef NO_GZCOMPRESS
gz_statep state;
+#ifndef GZGUTS_H_
+#define GZGUTS_H_
/* gzguts.h -- zlib internal header definitions for gz* operations
* Copyright (C) 2004, 2005, 2010, 2011, 2012, 2013 Mark Adler
* For conditions of distribution and use, see copyright notice in zlib.h
#endif
#include <stdio.h>
-#include "zlib.h"
#include <string.h>
#include <stdlib.h>
#include <limits.h>
#include <fcntl.h>
+#include "zlib.h"
#ifdef _WIN32
# include <stddef.h>
/* provide prototypes for these when building zlib without LFS */
#if (!defined(_LARGEFILE64_SOURCE) || _LFS64_LARGEFILE-0 == 0) && defined(WITH_GZFILEOP)
- ZEXTERN gzFile ZEXPORT gzopen64 (const char *, const char *);
- ZEXTERN z_off64_t ZEXPORT gzseek64 (gzFile, z_off64_t, int);
- ZEXTERN z_off64_t ZEXPORT gztell64 (gzFile);
- ZEXTERN z_off64_t ZEXPORT gzoffset64 (gzFile);
+ ZEXTERN gzFile ZEXPORT gzopen64(const char *, const char *);
+ ZEXTERN z_off64_t ZEXPORT gzseek64(gzFile, z_off64_t, int);
+ ZEXTERN z_off64_t ZEXPORT gztell64(gzFile);
+ ZEXTERN z_off64_t ZEXPORT gzoffset64(gzFile);
#endif
/* default memLevel */
typedef gz_state *gz_statep;
/* shared functions */
-void ZLIB_INTERNAL gz_error (gz_statep, int, const char *);
+void ZLIB_INTERNAL gz_error(gz_statep, int, const char *);
/* GT_OFF(x), where x is an unsigned value, is true if x > maximum z_off64_t
value -- needed when comparing unsigned to z_off64_t, which is signed
#ifdef INT_MAX
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX)
#else
-unsigned ZLIB_INTERNAL gz_intmax (void);
+unsigned ZLIB_INTERNAL gz_intmax(void);
# define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > gz_intmax())
#endif
+
+#endif /* GZGUTS_H_ */
#endif
/* Local functions */
-local void gz_reset (gz_statep);
-local gzFile gz_open (const void *, int, const char *);
+local void gz_reset(gz_statep);
+local gzFile gz_open(const void *, int, const char *);
/* Reset gzip file state */
-local void gz_reset(gz_statep state)
-{
+local void gz_reset(gz_statep state) {
state->x.have = 0; /* no output data available */
if (state->mode == GZ_READ) { /* for reading ... */
state->eof = 0; /* not at end of file */
}
/* Open a gzip file either by name or file descriptor. */
-local gzFile gz_open(const void *path, int fd, const char *mode)
-{
+local gzFile gz_open(const void *path, int fd, const char *mode) {
gz_statep state;
size_t len;
int oflag;
state->strategy = Z_DEFAULT_STRATEGY;
state->direct = 0;
while (*mode) {
- if (*mode >= '0' && *mode <= '9')
+ if (*mode >= '0' && *mode <= '9') {
state->level = *mode - '0';
- else
+ } else {
switch (*mode) {
case 'r':
state->mode = GZ_READ;
state->direct = 1;
break;
default: /* could consider as an error, but just ignore */
- ;
+ {}
}
+ }
mode++;
}
len = wcstombs(NULL, path, 0);
if (len == (size_t)-1)
len = 0;
- }
- else
+ } else
#endif
len = strlen((const char *)path);
state->path = (char *)malloc(len + 1);
}
#if defined(_WIN32) || defined(__CYGWIN__)
if (fd == -2)
- if (len)
+ if (len) {
wcstombs(state->path, path, len + 1);
- else
+ } else {
*(state->path) = 0;
+ }
else
#endif
snprintf(state->path, len + 1, "%s", (const char *)path);
}
/* -- see zlib.h -- */
-gzFile ZEXPORT gzopen(const char *path, const char *mode)
-{
+gzFile ZEXPORT gzopen(const char *path, const char *mode) {
return gz_open(path, -1, mode);
}
/* -- see zlib.h -- */
-gzFile ZEXPORT gzopen64(const char *path, const char *mode)
-{
+gzFile ZEXPORT gzopen64(const char *path, const char *mode) {
return gz_open(path, -1, mode);
}
/* -- see zlib.h -- */
-gzFile ZEXPORT gzdopen(int fd, const char *mode)
-{
+gzFile ZEXPORT gzdopen(int fd, const char *mode) {
char *path; /* identifier for error messages */
gzFile gz;
/* -- see zlib.h -- */
#if defined(_WIN32) || defined(__CYGWIN__)
-gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode)
-{
+gzFile ZEXPORT gzopen_w(const wchar_t *path, const char *mode) {
return gz_open(path, -2, mode);
}
#endif
/* -- see zlib.h -- */
-int ZEXPORT gzbuffer(gzFile file, unsigned size)
-{
+int ZEXPORT gzbuffer(gzFile file, unsigned size) {
gz_statep state;
/* get internal structure and check integrity */
}
/* -- see zlib.h -- */
-int ZEXPORT gzrewind(gzFile file)
-{
+int ZEXPORT gzrewind(gzFile file) {
gz_statep state;
/* get internal structure */
state = (gz_statep)file;
/* check that we're reading and that there's no error */
- if (state->mode != GZ_READ ||
- (state->err != Z_OK && state->err != Z_BUF_ERROR))
+ if (state->mode != GZ_READ || (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* back up and start over */
}
/* -- see zlib.h -- */
-z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence)
-{
+z_off64_t ZEXPORT gzseek64(gzFile file, z_off64_t offset, int whence) {
unsigned n;
z_off64_t ret;
gz_statep state;
state->seek = 0;
/* if within raw area while reading, just go there */
- if (state->mode == GZ_READ && state->how == COPY &&
- state->x.pos + offset >= 0) {
+ if (state->mode == GZ_READ && state->how == COPY && state->x.pos + offset >= 0) {
ret = LSEEK(state->fd, offset - state->x.have, SEEK_CUR);
if (ret == -1)
return -1;
/* if reading, skip what's in output buffer (one less gzgetc() check) */
if (state->mode == GZ_READ) {
- n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ?
- (unsigned)offset : state->x.have;
+ n = GT_OFF(state->x.have) || (z_off64_t)state->x.have > offset ? (unsigned)offset : state->x.have;
state->x.have -= n;
state->x.next += n;
state->x.pos += n;
}
/* -- see zlib.h -- */
-z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence)
-{
+z_off_t ZEXPORT gzseek(gzFile file, z_off_t offset, int whence) {
z_off64_t ret;
ret = gzseek64(file, (z_off64_t)offset, whence);
}
/* -- see zlib.h -- */
-z_off64_t ZEXPORT gztell64(gzFile file)
-{
+z_off64_t ZEXPORT gztell64(gzFile file) {
gz_statep state;
/* get internal structure and check integrity */
}
/* -- see zlib.h -- */
-z_off_t ZEXPORT gztell(gzFile file)
-{
+z_off_t ZEXPORT gztell(gzFile file) {
z_off64_t ret;
ret = gztell64(file);
}
/* -- see zlib.h -- */
-z_off64_t ZEXPORT gzoffset64(gzFile file)
-{
+z_off64_t ZEXPORT gzoffset64(gzFile file) {
z_off64_t offset;
gz_statep state;
}
/* -- see zlib.h -- */
-z_off_t ZEXPORT gzoffset(gzFile file)
-{
+z_off_t ZEXPORT gzoffset(gzFile file) {
z_off64_t ret;
ret = gzoffset64(file);
}
/* -- see zlib.h -- */
-int ZEXPORT gzeof(gzFile file)
-{
+int ZEXPORT gzeof(gzFile file) {
gz_statep state;
/* get internal structure and check integrity */
}
/* -- see zlib.h -- */
-const char * ZEXPORT gzerror(gzFile file, int *errnum)
-{
+const char * ZEXPORT gzerror(gzFile file, int *errnum) {
gz_statep state;
/* get internal structure and check integrity */
/* return error information */
if (errnum != NULL)
*errnum = state->err;
- return state->err == Z_MEM_ERROR ? "out of memory" :
- (state->msg == NULL ? "" : state->msg);
+ return state->err == Z_MEM_ERROR ? "out of memory" : (state->msg == NULL ? "" : state->msg);
}
/* -- see zlib.h -- */
-void ZEXPORT gzclearerr(gzFile file)
-{
+void ZEXPORT gzclearerr(gzFile file) {
gz_statep state;
/* get internal structure and check integrity */
memory). Simply save the error message as a static string. If there is an
allocation failure constructing the error message, then convert the error to
out of memory. */
-void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg)
-{
+void ZLIB_INTERNAL gz_error(gz_statep state, int err, const char *msg) {
/* free previously allocated message and clear */
if (state->msg != NULL) {
if (state->err != Z_MEM_ERROR)
return;
/* construct error message with path */
- if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) ==
- NULL) {
+ if ((state->msg = (char *)malloc(strlen(state->path) + strlen(msg) + 3)) == NULL) {
state->err = Z_MEM_ERROR;
return;
}
- snprintf(state->msg, strlen(state->path) + strlen(msg) + 3,
- "%s%s%s", state->path, ": ", msg);
+ snprintf(state->msg, strlen(state->path) + strlen(msg) + 3, "%s%s%s", state->path, ": ", msg);
return;
}
available) -- we need to do this to cover cases where 2's complement not
used, since C standard permits 1's complement and sign-bit representations,
otherwise we could just use ((unsigned)-1) >> 1 */
-unsigned ZLIB_INTERNAL gz_intmax()
-{
+unsigned ZLIB_INTERNAL gz_intmax() {
unsigned p, q;
p = 1;
#include "gzguts.h"
/* Local functions */
-local int gz_load (gz_statep, unsigned char *, unsigned, unsigned *);
-local int gz_avail (gz_statep);
-local int gz_look (gz_statep);
-local int gz_decomp (gz_statep);
-local int gz_fetch (gz_statep);
-local int gz_skip (gz_statep, z_off64_t);
+local int gz_load(gz_statep, unsigned char *, unsigned, unsigned *);
+local int gz_avail(gz_statep);
+local int gz_look(gz_statep);
+local int gz_decomp(gz_statep);
+local int gz_fetch(gz_statep);
+local int gz_skip(gz_statep, z_off64_t);
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
state->fd, and update state->eof, state->err, and state->msg as appropriate.
This function needs to loop on read(), since read() is not guaranteed to
read the number of bytes requested, depending on the type of descriptor. */
-local int gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned *have)
-{
+local int gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned *have) {
int ret;
*have = 0;
If strm->avail_in != 0, then the current data is moved to the beginning of
the input buffer, and then the remainder of the buffer is loaded with the
available data from the input file. */
-local int gz_avail(gz_statep state)
-{
+local int gz_avail(gz_statep state) {
unsigned got;
z_stream *strm = &(state->strm);
*p++ = *q++;
} while (--n);
}
- if (gz_load(state, state->in + strm->avail_in,
- state->size - strm->avail_in, &got) == -1)
+ if (gz_load(state, state->in + strm->avail_in, state->size - strm->avail_in, &got) == -1)
return -1;
strm->avail_in += got;
strm->next_in = state->in;
case, all further file reads will be directly to either the output buffer or
a user buffer. If decompressing, the inflate state will be initialized.
gz_look() will return 0 on success or -1 on failure. */
-local int gz_look(gz_statep state)
-{
+local int gz_look(gz_statep state) {
z_stream *strm = &(state->strm);
/* allocate read buffers and inflate memory */
data. If the gzip stream completes, state->how is reset to LOOK to look for
the next gzip stream or raw data, once state->x.have is depleted. Returns 0
on success, -1 on failure. */
-local int gz_decomp(gz_statep state)
-{
+local int gz_decomp(gz_statep state) {
int ret = Z_OK;
unsigned had;
z_stream *strm = &(state->strm);
/* decompress and handle errors */
ret = inflate(strm, Z_NO_FLUSH);
if (ret == Z_STREAM_ERROR || ret == Z_NEED_DICT) {
- gz_error(state, Z_STREAM_ERROR,
- "internal error: inflate stream corrupt");
+ gz_error(state, Z_STREAM_ERROR, "internal error: inflate stream corrupt");
return -1;
}
if (ret == Z_MEM_ERROR) {
return -1;
}
if (ret == Z_DATA_ERROR) { /* deflate stream invalid */
- gz_error(state, Z_DATA_ERROR,
- strm->msg == NULL ? "compressed data error" : strm->msg);
+ gz_error(state, Z_DATA_ERROR, strm->msg == NULL ? "compressed data error" : strm->msg);
return -1;
}
} while (strm->avail_out && ret != Z_STREAM_END);
looked for to determine whether to copy or decompress. Returns -1 on error,
otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
end of the input file has been reached and all data has been processed. */
-local int gz_fetch(gz_statep state)
-{
+local int gz_fetch(gz_statep state) {
z_stream *strm = &(state->strm);
do {
- switch(state->how) {
+ switch (state->how) {
case LOOK: /* -> LOOK, COPY (only if never GZIP), or GZIP */
if (gz_look(state) == -1)
return -1;
}
/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
-local int gz_skip(gz_statep state, z_off64_t len)
-{
+local int gz_skip(gz_statep state, z_off64_t len) {
unsigned n;
/* skip over len bytes or reach end-of-file, whichever comes first */
state->x.next += n;
state->x.pos += n;
len -= n;
- }
-
- /* output buffer empty -- return if we're at the end of the input */
- else if (state->eof && state->strm.avail_in == 0)
+ } else if (state->eof && state->strm.avail_in == 0) {
+ /* output buffer empty -- return if we're at the end of the input */
break;
-
- /* need more data to skip -- load up output buffer */
- else {
+ } else {
+ /* need more data to skip -- load up output buffer */
/* get more output, looking for header if required */
if (gz_fetch(state) == -1)
return -1;
}
/* -- see zlib.h -- */
-int ZEXPORT gzread(gzFile file, void *buf, unsigned len)
-{
+int ZEXPORT gzread(gzFile file, void *buf, unsigned len) {
unsigned got, n;
gz_statep state;
z_stream *strm;
strm = &(state->strm);
/* check that we're reading and that there's no (serious) error */
- if (state->mode != GZ_READ ||
- (state->err != Z_OK && state->err != Z_BUF_ERROR))
+ if (state->mode != GZ_READ || (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* since an int is returned, make sure len fits in one, otherwise return
memcpy(buf, state->x.next, n);
state->x.next += n;
state->x.have -= n;
- }
-
- /* output buffer empty -- return if we're at the end of the input */
- else if (state->eof && strm->avail_in == 0) {
+ } else if (state->eof && strm->avail_in == 0) {
+ /* output buffer empty -- return if we're at the end of the input */
state->past = 1; /* tried to read past end */
break;
- }
-
- /* need output data -- for small len or new stream load up our output
- buffer */
- else if (state->how == LOOK || len < (state->size << 1)) {
+ } else if (state->how == LOOK || len < (state->size << 1)) {
+ /* need output data -- for small len or new stream load up our output buffer */
/* get more output, looking for header if required */
if (gz_fetch(state) == -1)
return -1;
continue; /* no progress yet -- go back to copy above */
/* the copy above assures that we will leave with space in the
output buffer, allowing at least one gzungetc() to succeed */
- }
-
- /* large len -- read directly into user buffer */
- else if (state->how == COPY) { /* read directly */
+ } else if (state->how == COPY) { /* read directly */
+ /* large len -- read directly into user buffer */
if (gz_load(state, (unsigned char *)buf, len, &n) == -1)
return -1;
- }
-
- /* large len -- decompress directly into user buffer */
- else { /* state->how == GZIP */
+ } else { /* state->how == GZIP */
+ /* large len -- decompress directly into user buffer */
strm->avail_out = len;
strm->next_out = (unsigned char *)buf;
if (gz_decomp(state) == -1)
/* -- see zlib.h -- */
#undef gzgetc
-int ZEXPORT gzgetc(gzFile file)
-{
+int ZEXPORT gzgetc(gzFile file) {
int ret;
unsigned char buf[1];
gz_statep state;
state = (gz_statep)file;
/* check that we're reading and that there's no (serious) error */
- if (state->mode != GZ_READ ||
- (state->err != Z_OK && state->err != Z_BUF_ERROR))
+ if (state->mode != GZ_READ || (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* try output buffer (no need to check for skip request) */
return ret < 1 ? -1 : buf[0];
}
-int ZEXPORT gzgetc_(gzFile file)
-{
+int ZEXPORT gzgetc_(gzFile file) {
return gzgetc(file);
}
/* -- see zlib.h -- */
-int ZEXPORT gzungetc(int c, gzFile file)
-{
+int ZEXPORT gzungetc(int c, gzFile file) {
gz_statep state;
/* get internal structure */
state = (gz_statep)file;
/* check that we're reading and that there's no (serious) error */
- if (state->mode != GZ_READ ||
- (state->err != Z_OK && state->err != Z_BUF_ERROR))
+ if (state->mode != GZ_READ || (state->err != Z_OK && state->err != Z_BUF_ERROR))
return -1;
/* process a skip request */
}
/* -- see zlib.h -- */
-char * ZEXPORT gzgets(gzFile file, char *buf, int len)
-{
+char * ZEXPORT gzgets(gzFile file, char *buf, int len) {
unsigned left, n;
char *str;
unsigned char *eol;
state = (gz_statep)file;
/* check that we're reading and that there's no (serious) error */
- if (state->mode != GZ_READ ||
- (state->err != Z_OK && state->err != Z_BUF_ERROR))
+ if (state->mode != GZ_READ || (state->err != Z_OK && state->err != Z_BUF_ERROR))
return NULL;
/* process a skip request */
}
/* -- see zlib.h -- */
-int ZEXPORT gzdirect(gzFile file)
-{
+int ZEXPORT gzdirect(gzFile file) {
gz_statep state;
/* get internal structure */
if (file == NULL)
return 0;
+
state = (gz_statep)file;
/* if the state is not known, but we can find out, then do so (this is
}
/* -- see zlib.h -- */
-int ZEXPORT gzclose_r(gzFile file)
-{
+int ZEXPORT gzclose_r(gzFile file) {
int ret, err;
gz_statep state;
/* get internal structure */
if (file == NULL)
return Z_STREAM_ERROR;
+
state = (gz_statep)file;
/* check that we're reading */
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <stdarg.h>
#include "gzguts.h"
/* Local functions */
-local int gz_init (gz_statep);
-local int gz_comp (gz_statep, int);
-local int gz_zero (gz_statep, z_off64_t);
+local int gz_init(gz_statep);
+local int gz_comp(gz_statep, int);
+local int gz_zero(gz_statep, z_off64_t);
/* Initialize state for writing a gzip file. Mark initialization by setting
state->size to non-zero. Return -1 on failure or 0 on success. */
-local int gz_init(gz_statep state)
-{
+local int gz_init(gz_statep state) {
int ret;
z_stream *strm = &(state->strm);
strm->zalloc = Z_NULL;
strm->zfree = Z_NULL;
strm->opaque = Z_NULL;
- ret = deflateInit2(strm, state->level, Z_DEFLATED,
- MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy);
+ ret = deflateInit2(strm, state->level, Z_DEFLATED, MAX_WBITS + 16, DEF_MEM_LEVEL, state->strategy);
if (ret != Z_OK) {
free(state->out);
free(state->in);
then the deflate() state is reset to start a new gzip stream. If gz->direct
is true, then simply write to the output file without compressing, and
ignore flush. */
-local int gz_comp(gz_statep state, int flush)
-{
+local int gz_comp(gz_statep state, int flush) {
int ret, got;
unsigned have;
z_stream *strm = &(state->strm);
do {
/* write out current buffer contents if full, or if flushing, but if
doing Z_FINISH then don't write until we get to Z_STREAM_END */
- if (strm->avail_out == 0 || (flush != Z_NO_FLUSH &&
- (flush != Z_FINISH || ret == Z_STREAM_END))) {
+ if (strm->avail_out == 0 || (flush != Z_NO_FLUSH && (flush != Z_FINISH || ret == Z_STREAM_END))) {
have = (unsigned)(strm->next_out - state->x.next);
- if (have && ((got = write(state->fd, state->x.next, have)) < 0 ||
- (unsigned)got != have)) {
+ if (have && ((got = write(state->fd, state->x.next, have)) < 0 || (unsigned)got != have)) {
gz_error(state, Z_ERRNO, zstrerror());
return -1;
}
have = strm->avail_out;
ret = deflate(strm, flush);
if (ret == Z_STREAM_ERROR) {
- gz_error(state, Z_STREAM_ERROR,
- "internal error: deflate stream corrupt");
+ gz_error(state, Z_STREAM_ERROR, "internal error: deflate stream corrupt");
return -1;
}
have -= strm->avail_out;
}
/* Compress len zeros to output. Return -1 on error, 0 on success. */
-local int gz_zero(gz_statep state, z_off64_t len)
-{
+local int gz_zero(gz_statep state, z_off64_t len) {
int first;
unsigned n;
z_stream *strm = &(state->strm);
/* compress len zeros (len guaranteed > 0) */
first = 1;
while (len) {
- n = GT_OFF(state->size) || (z_off64_t)state->size > len ?
- (unsigned)len : state->size;
+ n = GT_OFF(state->size) || (z_off64_t)state->size > len ? (unsigned)len : state->size;
if (first) {
memset(state->in, 0, n);
first = 0;
}
/* -- see zlib.h -- */
-int ZEXPORT gzwrite(gzFile file, void const *buf, unsigned len)
-{
+int ZEXPORT gzwrite(gzFile file, void const *buf, unsigned len) {
unsigned put = len;
gz_statep state;
z_stream *strm;
if (len && gz_comp(state, Z_NO_FLUSH) == -1)
return 0;
} while (len);
- }
- else {
+ } else {
/* consume whatever's left in the input buffer */
if (strm->avail_in && gz_comp(state, Z_NO_FLUSH) == -1)
return 0;
}
/* -- see zlib.h -- */
-int ZEXPORT gzputc(gzFile file, int c)
-{
+int ZEXPORT gzputc(gzFile file, int c) {
unsigned have;
unsigned char buf[1];
gz_statep state;
}
/* -- see zlib.h -- */
-int ZEXPORT gzputs(gzFile file, const char *str)
-{
+int ZEXPORT gzputs(gzFile file, const char *str) {
int ret;
unsigned len;
return ret == 0 && len != 0 ? -1 : ret;
}
-#include <stdarg.h>
-
/* -- see zlib.h -- */
-int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va)
-{
+int ZEXPORTVA gzvprintf(gzFile file, const char *format, va_list va) {
int size, len;
gz_statep state;
z_stream *strm;
return len;
}
-int ZEXPORTVA gzprintf(gzFile file, const char *format, ...)
-{
+int ZEXPORTVA gzprintf(gzFile file, const char *format, ...) {
va_list va;
int ret;
}
/* -- see zlib.h -- */
-int ZEXPORT gzflush(gzFile file, int flush)
-{
+int ZEXPORT gzflush(gzFile file, int flush) {
gz_statep state;
/* get internal structure */
}
/* -- see zlib.h -- */
-int ZEXPORT gzsetparams(gzFile file, int level, int strategy)
-{
+int ZEXPORT gzsetparams(gzFile file, int level, int strategy) {
gz_statep state;
z_stream *strm;
}
/* -- see zlib.h -- */
-int ZEXPORT gzclose_w(gzFile file)
-{
+int ZEXPORT gzclose_w(gzFile file) {
int ret = Z_OK;
gz_statep state;