alpar@9: /* gzguts.h (zlib internal header definitions for gz* operations) */ alpar@9: alpar@9: /* Modified by Andrew Makhorin , April 2011 */ alpar@9: alpar@9: /* Copyright (C) 2004, 2005, 2010 Mark Adler alpar@9: * For conditions of distribution and use, see copyright notice in alpar@9: * zlib.h */ alpar@9: alpar@9: /* WARNING: this file should *not* be used by applications. It is alpar@9: part of the implementation of the compression library and is alpar@9: subject to change. Applications should only use zlib.h. */ alpar@9: alpar@9: #ifndef GZGUTS_H alpar@9: #define GZGUTS_H alpar@9: alpar@9: #define ZLIB_INTERNAL alpar@9: alpar@9: #include alpar@9: #include alpar@9: #include alpar@9: #include alpar@9: #include alpar@9: #include "zio.h" alpar@9: #include "zlib.h" alpar@9: alpar@9: #define local static alpar@9: alpar@9: #define zstrerror() strerror(errno) alpar@9: alpar@9: #define GZBUFSIZE 8192 alpar@9: alpar@9: #define GZ_NONE 0 alpar@9: #define GZ_READ 7247 alpar@9: #define GZ_WRITE 31153 alpar@9: #define GZ_APPEND 1 alpar@9: alpar@9: #define LOOK 0 alpar@9: #define COPY 1 alpar@9: #define GZIP 2 alpar@9: alpar@9: typedef struct alpar@9: { int mode; alpar@9: int fd; alpar@9: char *path; alpar@9: z_off64_t pos; alpar@9: unsigned size; alpar@9: unsigned want; alpar@9: unsigned char *in; alpar@9: unsigned char *out; alpar@9: unsigned char *next; alpar@9: unsigned have; alpar@9: int eof; alpar@9: z_off64_t start; alpar@9: z_off64_t raw; alpar@9: int how; alpar@9: int direct; alpar@9: int level; alpar@9: int strategy; alpar@9: z_off64_t skip; alpar@9: int seek; alpar@9: int err; alpar@9: char *msg; alpar@9: z_stream strm; alpar@9: } gz_state; alpar@9: alpar@9: typedef gz_state *gz_statep; alpar@9: alpar@9: void ZLIB_INTERNAL gz_error OF((gz_statep, int, const char *)); alpar@9: alpar@9: #define GT_OFF(x) (sizeof(int) == sizeof(z_off64_t) && (x) > INT_MAX) alpar@9: alpar@9: #endif alpar@9: alpar@9: /* eof */