doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Macros | Typedefs | Enumerations | Functions | Variables
Unzip.cpp File Reference
#include "../idlib/precompiled.h"
#include "Unzip.h"

Go to the source code of this file.

Classes

struct  inflate_huft_s
 
struct  inflate_blocks_state
 
struct  inflate_codes_state
 
struct  internal_state
 

Macros

#define _ZCONF_H
 
#define MAX_MEM_LEVEL   9
 
#define MAX_WBITS   15 /* 32K LZ77 window */
 
#define OF(args)   args
 
#define SEEK_SET   0 /* Seek from beginning of file. */
 
#define SEEK_CUR   1 /* Seek from current position. */
 
#define SEEK_END   2 /* Set file pointer to EOF plus "offset" */
 
#define ZLIB_VERSION   "1.1.3"
 
#define Z_NO_FLUSH   0
 
#define Z_PARTIAL_FLUSH   1 /* will be removed, use Z_SYNC_FLUSH instead */
 
#define Z_SYNC_FLUSH   2
 
#define Z_FULL_FLUSH   3
 
#define Z_FINISH   4
 
#define Z_OK   0
 
#define Z_STREAM_END   1
 
#define Z_NEED_DICT   2
 
#define Z_ERRNO   (-1)
 
#define Z_STREAM_ERROR   (-2)
 
#define Z_DATA_ERROR   (-3)
 
#define Z_MEM_ERROR   (-4)
 
#define Z_BUF_ERROR   (-5)
 
#define Z_VERSION_ERROR   (-6)
 
#define Z_NO_COMPRESSION   0
 
#define Z_BEST_SPEED   1
 
#define Z_BEST_COMPRESSION   9
 
#define Z_DEFAULT_COMPRESSION   (-1)
 
#define Z_FILTERED   1
 
#define Z_HUFFMAN_ONLY   2
 
#define Z_DEFAULT_STRATEGY   0
 
#define Z_BINARY   0
 
#define Z_ASCII   1
 
#define Z_UNKNOWN   2
 
#define Z_DEFLATED   8
 
#define Z_NULL   0 /* for initializing zalloc, zfree, opaque */
 
#define zlib_version   zlibVersion()
 
#define deflateInit(strm, level)   deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))
 
#define inflateInit(strm)   inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))
 
#define deflateInit2(strm, level, method, windowBits, memLevel, strategy)
 
#define inflateInit2(strm, windowBits)   inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))
 
#define ERR_MSG(err)   z_errmsg[Z_NEED_DICT-(err)]
 
#define ERR_RETURN(strm, err)   return (strm->msg = (char*)ERR_MSG(err), (err))
 
#define DEF_WBITS   MAX_WBITS
 
#define DEF_MEM_LEVEL   8
 
#define STORED_BLOCK   0
 
#define STATIC_TREES   1
 
#define DYN_TREES   2
 
#define MIN_MATCH   3
 
#define MAX_MATCH   258
 
#define PRESET_DICT   0x20 /* preset dictionary flag in zlib header */
 
#define OS_CODE   0x03 /* assume Unix */
 
#define F_OPEN(name, mode)   fopen((name), (mode))
 
#define zstrerror(errnum)   ""
 
#define zmemcpy   memcpy
 
#define zmemcmp   memcmp
 
#define zmemzero(dest, len)   memset(dest, 0, len)
 
#define Assert(cond, msg)
 
#define Trace(x)
 
#define Tracev(x)
 
#define Tracevv(x)
 
#define Tracec(c, x)
 
#define Tracecv(c, x)
 
#define ZALLOC(strm, items, size)   (*((strm)->zalloc))((strm)->opaque, (items), (size))
 
#define ZFREE(strm, addr)   (*((strm)->zfree))((strm)->opaque, (voidp)(addr))
 
#define TRY_FREE(s, p)   {if (p) ZFREE(s, p);}
 
#define CASESENSITIVITYDEFAULT_NO
 
#define UNZ_BUFSIZE   (65536)
 
#define UNZ_MAXFILENAMEINZIP   (256)
 
#define ALLOC(size)   (Mem_Alloc(size))
 
#define TRYFREE(p)   {if (p) Mem_Free(p);}
 
#define SIZECENTRALDIRITEM   (0x2e)
 
#define SIZEZIPLOCALHEADER   (0x1e)
 
#define CASESENSITIVITYDEFAULTVALUE   2
 
#define STRCMPCASENOSENTIVEFUNCTION   strcmpcasenosensitive_internal
 
#define BUFREADCOMMENT   (0x400)
 
#define DO1(buf)   crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
 
#define DO2(buf)   DO1(buf); DO1(buf);
 
#define DO4(buf)   DO2(buf); DO2(buf);
 
#define DO8(buf)   DO4(buf); DO4(buf);
 
#define exop   word.what.Exop
 
#define bits   word.what.Bits
 
#define MANY   1440
 
#define _INFUTIL_H
 
#define UPDBITS   {s->bitb=b;s->bitk=k;}
 
#define UPDIN   {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}
 
#define UPDOUT   {s->write=q;}
 
#define UPDATE   {UPDBITS UPDIN UPDOUT}
 
#define LEAVE   {UPDATE return inflate_flush(s,z,r);}
 
#define LOADIN   {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
 
#define NEEDBYTE   {if(n)r=Z_OK;else LEAVE}
 
#define NEXTBYTE   (n--,*p++)
 
#define NEEDBITS(j)   {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
 
#define DUMPBITS(j)   {b>>=(j);k-=(j);}
 
#define WAVAIL   (uInt)(q<s->read?s->read-q-1:s->end-q)
 
#define LOADOUT   {q=s->write;m=(uInt)WAVAIL;}
 
#define WRAP   {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}
 
#define FLUSH   {UPDOUT r=inflate_flush(s,z,r); LOADOUT}
 
#define NEEDOUT   {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}
 
#define OUTBYTE(a)   {*q++=(Byte)(a);m--;}
 
#define LOAD   {LOADIN LOADOUT}
 
#define exop   word.what.Exop
 
#define bits   word.what.Bits
 
#define BMAX   15 /* maximum bit length of any code */
 
#define C0   *p++ = 0;
 
#define C2   C0 C0 C0 C0
 
#define C4   C2 C2 C2 C2
 
#define exop   word.what.Exop
 
#define bits   word.what.Bits
 
#define GRABBITS(j)   {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}
 
#define UNGRAB   {c=z->avail_in-n;c=(k>>3)<c?k>>3:c;n+=c;p-=c;k-=c<<3;}
 
#define exop   word.what.Exop
 
#define bits   word.what.Bits
 
#define BASE   65521L /* largest prime smaller than 65536 */
 
#define NMAX   5552
 
#define DO1(buf, i)   {s1 += buf[i]; s2 += s1;}
 
#define DO2(buf, i)   DO1(buf,i); DO1(buf,i+1);
 
#define DO4(buf, i)   DO2(buf,i); DO2(buf,i+2);
 
#define DO8(buf, i)   DO4(buf,i); DO4(buf,i+4);
 
#define DO16(buf)   DO8(buf,0); DO8(buf,8);
 
#define iNEEDBYTE   {if(z->avail_in==0)return r;r=f;}
 
#define iNEXTBYTE   (z->avail_in--,z->total_in++,*z->next_in++)
 

Typedefs

typedef unsigned char Byte
 
typedef unsigned int uInt
 
typedef unsigned long uLong
 
typedef Bytevoidp
 
typedef voidp gzFile
 
typedef unsigned char uch
 
typedef unsigned short ush
 
typedef unsigned long ulg
 
typedef uLong check_func OF ((uLong check, const Byte *buf, uInt len))
 
typedef struct inflate_blocks_state inflate_blocks_statef
 
typedef struct inflate_huft_s inflate_huft
 
typedef struct inflate_codes_state inflate_codes_statef
 

Enumerations

enum  inflate_block_mode {
  TYPE, LENS, STORED, TABLE,
  BTREE, DTREE, CODES, DRY,
  DONE, BAD
}
 
enum  inflate_codes_mode {
  START, LEN, LENEXT, DIST,
  DISTEXT, COPY, LIT, WASH,
  END, BADCODE
}
 
enum  inflate_mode {
  imMETHOD, imFLAG, imDICT4, imDICT3,
  imDICT2, imDICT1, imDICT0, imBLOCKS,
  imCHECK4, imCHECK3, imCHECK2, imCHECK1,
  imDONE, imBAD
}
 

Functions

const char *zlibVersion OF ((void))
 
int deflate OF ((z_streamp strm, int flush))
 
int deflateEnd OF ((z_streamp strm))
 
int deflateSetDictionary OF ((z_streamp strm, const Byte *dictionary, uIntdictLength))
 
int deflateCopy OF ((z_streamp dest, z_streamp source))
 
int deflateParams OF ((z_streamp strm, int level, int strategy))
 
int compress OF ((Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen))
 
int compress2 OF ((Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen, int level))
 
gzFile gzopen OF ((const char *path, const char *mode))
 
gzFile gzdopen OF ((int fd, const char *mode))
 
int gzsetparams OF ((gzFile file, int level, int strategy))
 
int gzread OF ((gzFile file, voidp buf, unsigned len))
 
int gzprintf OF ((gzFile file, const char *format,...))
 
int gzputs OF ((gzFile file, const char *s))
 
char *gzgets OF ((gzFile file, char *buf, int len))
 
int gzputc OF ((gzFile file, int c))
 
int gzgetc OF ((gzFile file))
 
int gzflush OF ((gzFile file, int flush))
 
long gzseek OF ((gzFile file, long offset, int whence))
 
const char *gzerror OF ((gzFile file, int *errnum))
 
uLong adler32 OF ((uLong adler, const Byte *buf, uInt len))
 
uLong crc32 OF ((uLong crc, const Byte *buf, uInt len))
 
int deflateInit_ OF ((z_streamp strm, int level, const char *version, int stream_size))
 
int inflateInit_ OF ((z_streamp strm, const char *version, int stream_size))
 
int deflateInit2_ OF ((z_streamp strm, intlevel, intmethod, int windowBits, int memLevel, int strategy, const char *version, int stream_size))
 
int inflateInit2_ OF ((z_streamp strm, intwindowBits, const char *version, int stream_size))
 
const char *zError OF ((int err))
 
int inflateSyncPoint OF ((z_streamp z))
 
voidp zcalloc OF ((voidp opaque, unsigned items, unsigned size))
 
void zcfree OF ((voidp opaque, voidp ptr))
 
int unzStringFileNameCompare (const char *fileName1, const char *fileName2, int iCaseSensitivity)
 
unzFile unzReOpen (const char *path, unzFile file)
 
unzFile unzOpen (const char *path)
 
int unzClose (unzFile file)
 
int unzGetGlobalInfo (unzFile file, unz_global_info *pglobal_info)
 
int unzGetCurrentFileInfo (unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)
 
int unzGoToFirstFile (unzFile file)
 
int unzGoToNextFile (unzFile file)
 
int unzGetCurrentFileInfoPosition (unzFile file, unsigned long *pos)
 
int unzSetCurrentFileInfoPosition (unzFile file, unsigned long pos)
 
int unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)
 
int unzOpenCurrentFile (unzFile file)
 
int unzReadCurrentFile (unzFile file, void *buf, unsigned len)
 
long unztell (unzFile file)
 
int unzeof (unzFile file)
 
int unzGetLocalExtrafield (unzFile file, void *buf, unsigned len)
 
int unzCloseCurrentFile (unzFile file)
 
int unzGetGlobalComment (unzFile file, char *szComment, uLong uSizeBuf)
 
const uLongget_crc_table ()
 
uLong crc32 (uLong crc, const Byte *buf, uInt len)
 
inflate_blocks_statef
*inflate_blocks_new 
OF ((z_streamp z, check_func c, uInt w))
 
int inflate_blocks OF ((inflate_blocks_statef *, z_streamp, int))
 
void inflate_blocks_reset OF ((inflate_blocks_statef *, z_streamp, uLong *))
 
int inflate_blocks_free OF ((inflate_blocks_statef *, z_streamp))
 
void inflate_set_dictionary OF ((inflate_blocks_statef *s, const Byte *d, uIntn))
 
int inflate_blocks_sync_point OF ((inflate_blocks_statef *s))
 
int inflate_trees_bits OF ((uInt *, uInt *, inflate_huft **, inflate_huft *, z_streamp))
 
int inflate_trees_dynamic OF ((uInt, uInt, uInt *, uInt *, uInt *, inflate_huft **, inflate_huft **, inflate_huft *, z_streamp))
 
int inflate_trees_fixed OF ((uInt *, uInt *, inflate_huft **, inflate_huft **, z_streamp))
 
inflate_codes_statef
*inflate_codes_new 
OF ((uInt, uInt, inflate_huft *, inflate_huft *, z_streamp))
 
void inflate_codes_free OF ((inflate_codes_statef *, z_streamp))
 
void inflate_blocks_reset (inflate_blocks_statef *s, z_streamp z, uLong *c)
 
inflate_blocks_statefinflate_blocks_new (z_streamp z, check_func c, uInt w)
 
int inflate_blocks (inflate_blocks_statef *s, z_streamp z, int r)
 
int inflate_blocks_free (inflate_blocks_statef *s, z_streamp z)
 
void inflate_set_dictionary (inflate_blocks_statef *s, const Byte *d, uInt n)
 
int inflate_blocks_sync_point (inflate_blocks_statef *s)
 
int inflate_flush (inflate_blocks_statef *s, z_streamp z, int r)
 
int inflate_trees_bits (uInt *c, uInt *bb, inflate_huft **tb, inflate_huft *hp, z_streamp z)
 
int inflate_trees_dynamic (uInt nl, uInt nd, uInt *c, uInt *bl, uInt *bd, inflate_huft **tl, inflate_huft **td, inflate_huft *hp, z_streamp z)
 
int inflate_trees_fixed (uInt *bl, uInt *bd, inflate_huft **tl, inflate_huft **td, z_streamp z)
 
int inflate_fast (uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td, inflate_blocks_statef *s, z_streamp z)
 
inflate_codes_statefinflate_codes_new (uInt bl, uInt bd, inflate_huft *tl, inflate_huft *td, z_streamp z)
 
int inflate_codes (inflate_blocks_statef *s, z_streamp z, int r)
 
void inflate_codes_free (inflate_codes_statef *c, z_streamp z)
 
uLong adler32 (uLong adler, const Byte *buf, uInt len)
 
int inflateReset (z_streamp z)
 
int inflateEnd (z_streamp z)
 
int inflateInit2_ (z_streamp z, int w, const char *version, int stream_size)
 
int inflateInit_ (z_streamp z, const char *version, int stream_size)
 
int inflate (z_streamp z, int f)
 
int inflateSetDictionary (z_streamp z, const Byte *dictionary, uInt dictLength)
 
int inflateSync (z_streamp z)
 
int inflateSyncPoint (z_streamp z)
 
voidp zcalloc (voidp opaque, unsigned items, unsigned size)
 
void zcfree (voidp opaque, voidp ptr)
 

Variables

const char * z_errmsg [10]
 
const char inflate_copyright []
 

Macro Definition Documentation

#define _INFUTIL_H

Definition at line 2542 of file Unzip.cpp.

#define _ZCONF_H

Definition at line 84 of file Unzip.cpp.

#define ALLOC (   size)    (Mem_Alloc(size))

Definition at line 1061 of file Unzip.cpp.

#define Assert (   cond,
  msg 
)

Definition at line 1027 of file Unzip.cpp.

#define BASE   65521L /* largest prime smaller than 65536 */

Definition at line 4037 of file Unzip.cpp.

#define bits   word.what.Bits

Definition at line 3797 of file Unzip.cpp.

#define bits   word.what.Bits

Definition at line 3797 of file Unzip.cpp.

#define bits   word.what.Bits

Definition at line 3797 of file Unzip.cpp.

#define bits   word.what.Bits

Definition at line 3797 of file Unzip.cpp.

#define BMAX   15 /* maximum bit length of any code */

Definition at line 3179 of file Unzip.cpp.

#define BUFREADCOMMENT   (0x400)

Definition at line 1221 of file Unzip.cpp.

#define C0   *p++ = 0;
#define C2   C0 C0 C0 C0
#define C4   C2 C2 C2 C2
#define CASESENSITIVITYDEFAULT_NO

Definition at line 1048 of file Unzip.cpp.

#define CASESENSITIVITYDEFAULTVALUE   2

Definition at line 1192 of file Unzip.cpp.

#define DEF_MEM_LEVEL   8

Definition at line 974 of file Unzip.cpp.

#define DEF_WBITS   MAX_WBITS

Definition at line 969 of file Unzip.cpp.

#define deflateInit (   strm,
  level 
)    deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream))

Definition at line 938 of file Unzip.cpp.

#define deflateInit2 (   strm,
  level,
  method,
  windowBits,
  memLevel,
  strategy 
)
Value:
deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\
(strategy), ZLIB_VERSION, sizeof(z_stream))
#define ZLIB_VERSION
Definition: Unzip.cpp:136
GLint level
Definition: glext.h:2878

Definition at line 942 of file Unzip.cpp.

#define DO1 (   buf)    crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);

Definition at line 4046 of file Unzip.cpp.

#define DO1 (   buf,
 
)    {s1 += buf[i]; s2 += s1;}

Definition at line 4046 of file Unzip.cpp.

#define DO16 (   buf)    DO8(buf,0); DO8(buf,8);

Definition at line 4050 of file Unzip.cpp.

#define DO2 (   buf)    DO1(buf); DO1(buf);

Definition at line 4047 of file Unzip.cpp.

#define DO2 (   buf,
 
)    DO1(buf,i); DO1(buf,i+1);

Definition at line 4047 of file Unzip.cpp.

#define DO4 (   buf)    DO2(buf); DO2(buf);

Definition at line 4048 of file Unzip.cpp.

#define DO4 (   buf,
 
)    DO2(buf,i); DO2(buf,i+2);

Definition at line 4048 of file Unzip.cpp.

#define DO8 (   buf)    DO4(buf); DO4(buf);

Definition at line 4049 of file Unzip.cpp.

#define DO8 (   buf,
 
)    DO4(buf,i); DO4(buf,i+4);

Definition at line 4049 of file Unzip.cpp.

#define DUMPBITS (   j)    {b>>=(j);k-=(j);}

Definition at line 2606 of file Unzip.cpp.

#define DYN_TREES   2

Definition at line 982 of file Unzip.cpp.

#define ERR_MSG (   err)    z_errmsg[Z_NEED_DICT-(err)]

Definition at line 960 of file Unzip.cpp.

#define ERR_RETURN (   strm,
  err 
)    return (strm->msg = (char*)ERR_MSG(err), (err))

Definition at line 962 of file Unzip.cpp.

#define exop   word.what.Exop

Definition at line 3796 of file Unzip.cpp.

#define exop   word.what.Exop

Definition at line 3796 of file Unzip.cpp.

#define exop   word.what.Exop

Definition at line 3796 of file Unzip.cpp.

#define exop   word.what.Exop

Definition at line 3796 of file Unzip.cpp.

#define F_OPEN (   name,
  mode 
)    fopen((name), (mode))

Definition at line 1000 of file Unzip.cpp.

#define FLUSH   {UPDOUT r=inflate_flush(s,z,r); LOADOUT}

Definition at line 2611 of file Unzip.cpp.

#define GRABBITS (   j)    {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}

Definition at line 3643 of file Unzip.cpp.

#define iNEEDBYTE   {if(z->avail_in==0)return r;r=f;}

Definition at line 4246 of file Unzip.cpp.

#define iNEXTBYTE   (z->avail_in--,z->total_in++,*z->next_in++)

Definition at line 4247 of file Unzip.cpp.

#define inflateInit (   strm)    inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream))

Definition at line 940 of file Unzip.cpp.

#define inflateInit2 (   strm,
  windowBits 
)    inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream))

Definition at line 945 of file Unzip.cpp.

#define LEAVE   {UPDATE return inflate_flush(s,z,r);}

Definition at line 2600 of file Unzip.cpp.

#define LOAD   {LOADIN LOADOUT}

Definition at line 2615 of file Unzip.cpp.

#define LOADIN   {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}

Definition at line 2602 of file Unzip.cpp.

#define LOADOUT   {q=s->write;m=(uInt)WAVAIL;}

Definition at line 2609 of file Unzip.cpp.

#define MANY   1440

Definition at line 2476 of file Unzip.cpp.

#define MAX_MATCH   258

Definition at line 986 of file Unzip.cpp.

#define MAX_MEM_LEVEL   9

Definition at line 91 of file Unzip.cpp.

#define MAX_WBITS   15 /* 32K LZ77 window */

Definition at line 101 of file Unzip.cpp.

#define MIN_MATCH   3

Definition at line 985 of file Unzip.cpp.

#define NEEDBITS (   j)    {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}

Definition at line 2605 of file Unzip.cpp.

#define NEEDBYTE   {if(n)r=Z_OK;else LEAVE}

Definition at line 2603 of file Unzip.cpp.

#define NEEDOUT   {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}

Definition at line 2612 of file Unzip.cpp.

#define NEXTBYTE   (n--,*p++)

Definition at line 2604 of file Unzip.cpp.

#define NMAX   5552

Definition at line 4038 of file Unzip.cpp.

#define OF (   args)    args

Definition at line 120 of file Unzip.cpp.

#define OS_CODE   0x03 /* assume Unix */

Definition at line 996 of file Unzip.cpp.

#define OUTBYTE (   a)    {*q++=(Byte)(a);m--;}

Definition at line 2613 of file Unzip.cpp.

#define PRESET_DICT   0x20 /* preset dictionary flag in zlib header */

Definition at line 989 of file Unzip.cpp.

#define SEEK_CUR   1 /* Seek from current position. */

Definition at line 130 of file Unzip.cpp.

#define SEEK_END   2 /* Set file pointer to EOF plus "offset" */

Definition at line 131 of file Unzip.cpp.

#define SEEK_SET   0 /* Seek from beginning of file. */

Definition at line 129 of file Unzip.cpp.

#define SIZECENTRALDIRITEM   (0x2e)

Definition at line 1067 of file Unzip.cpp.

#define SIZEZIPLOCALHEADER   (0x1e)

Definition at line 1068 of file Unzip.cpp.

#define STATIC_TREES   1

Definition at line 981 of file Unzip.cpp.

#define STORED_BLOCK   0

Definition at line 980 of file Unzip.cpp.

#define STRCMPCASENOSENTIVEFUNCTION   strcmpcasenosensitive_internal

Definition at line 1198 of file Unzip.cpp.

#define Trace (   x)

Definition at line 1028 of file Unzip.cpp.

#define Tracec (   c,
  x 
)

Definition at line 1031 of file Unzip.cpp.

#define Tracecv (   c,
  x 
)

Definition at line 1032 of file Unzip.cpp.

#define Tracev (   x)

Definition at line 1029 of file Unzip.cpp.

#define Tracevv (   x)

Definition at line 1030 of file Unzip.cpp.

#define TRY_FREE (   s,
  p 
)    {if (p) ZFREE(s, p);}

Definition at line 1043 of file Unzip.cpp.

#define TRYFREE (   p)    {if (p) Mem_Free(p);}

Definition at line 1064 of file Unzip.cpp.

#define UNGRAB   {c=z->avail_in-n;c=(k>>3)<c?k>>3:c;n+=c;p-=c;k-=c<<3;}

Definition at line 3644 of file Unzip.cpp.

#define UNZ_BUFSIZE   (65536)

Definition at line 1053 of file Unzip.cpp.

#define UNZ_MAXFILENAMEINZIP   (256)

Definition at line 1057 of file Unzip.cpp.

#define UPDATE   {UPDBITS UPDIN UPDOUT}

Definition at line 2599 of file Unzip.cpp.

#define UPDBITS   {s->bitb=b;s->bitk=k;}

Definition at line 2596 of file Unzip.cpp.

#define UPDIN   {z->avail_in=n;z->total_in+=p-z->next_in;z->next_in=p;}

Definition at line 2597 of file Unzip.cpp.

#define UPDOUT   {s->write=q;}

Definition at line 2598 of file Unzip.cpp.

#define WAVAIL   (uInt)(q<s->read?s->read-q-1:s->end-q)

Definition at line 2608 of file Unzip.cpp.

#define WRAP   {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}

Definition at line 2610 of file Unzip.cpp.

#define Z_ASCII   1

Definition at line 225 of file Unzip.cpp.

#define Z_BEST_COMPRESSION   9

Definition at line 215 of file Unzip.cpp.

#define Z_BEST_SPEED   1

Definition at line 214 of file Unzip.cpp.

#define Z_BINARY   0

Definition at line 224 of file Unzip.cpp.

#define Z_BUF_ERROR   (-5)

Definition at line 207 of file Unzip.cpp.

#define Z_DATA_ERROR   (-3)

Definition at line 205 of file Unzip.cpp.

#define Z_DEFAULT_COMPRESSION   (-1)

Definition at line 216 of file Unzip.cpp.

#define Z_DEFAULT_STRATEGY   0

Definition at line 221 of file Unzip.cpp.

#define Z_DEFLATED   8

Definition at line 229 of file Unzip.cpp.

#define Z_ERRNO   (-1)

Definition at line 203 of file Unzip.cpp.

#define Z_FILTERED   1

Definition at line 219 of file Unzip.cpp.

#define Z_FINISH   4

Definition at line 197 of file Unzip.cpp.

#define Z_FULL_FLUSH   3

Definition at line 196 of file Unzip.cpp.

#define Z_HUFFMAN_ONLY   2

Definition at line 220 of file Unzip.cpp.

#define Z_MEM_ERROR   (-4)

Definition at line 206 of file Unzip.cpp.

#define Z_NEED_DICT   2

Definition at line 202 of file Unzip.cpp.

#define Z_NO_COMPRESSION   0

Definition at line 213 of file Unzip.cpp.

#define Z_NO_FLUSH   0

Definition at line 193 of file Unzip.cpp.

#define Z_NULL   0 /* for initializing zalloc, zfree, opaque */

Definition at line 232 of file Unzip.cpp.

#define Z_OK   0

Definition at line 200 of file Unzip.cpp.

#define Z_PARTIAL_FLUSH   1 /* will be removed, use Z_SYNC_FLUSH instead */

Definition at line 194 of file Unzip.cpp.

#define Z_STREAM_END   1

Definition at line 201 of file Unzip.cpp.

#define Z_STREAM_ERROR   (-2)

Definition at line 204 of file Unzip.cpp.

#define Z_SYNC_FLUSH   2

Definition at line 195 of file Unzip.cpp.

#define Z_UNKNOWN   2

Definition at line 226 of file Unzip.cpp.

#define Z_VERSION_ERROR   (-6)

Definition at line 208 of file Unzip.cpp.

#define ZALLOC (   strm,
  items,
  size 
)    (*((strm)->zalloc))((strm)->opaque, (items), (size))

Definition at line 1040 of file Unzip.cpp.

#define ZFREE (   strm,
  addr 
)    (*((strm)->zfree))((strm)->opaque, (voidp)(addr))

Definition at line 1042 of file Unzip.cpp.

#define ZLIB_VERSION   "1.1.3"

Definition at line 136 of file Unzip.cpp.

#define zlib_version   zlibVersion()

Definition at line 234 of file Unzip.cpp.

#define zmemcmp   memcmp

Definition at line 1013 of file Unzip.cpp.

#define zmemcpy   memcpy

Definition at line 1012 of file Unzip.cpp.

#define zmemzero (   dest,
  len 
)    memset(dest, 0, len)

Definition at line 1014 of file Unzip.cpp.

#define zstrerror (   errnum)    ""

Definition at line 1009 of file Unzip.cpp.

Typedef Documentation

typedef unsigned char Byte

Definition at line 123 of file Unzip.cpp.

typedef voidp gzFile

Definition at line 725 of file Unzip.cpp.

Definition at line 2407 of file Unzip.cpp.

Definition at line 2515 of file Unzip.cpp.

typedef struct inflate_huft_s inflate_huft

Definition at line 2457 of file Unzip.cpp.

Definition at line 1036 of file Unzip.cpp.

typedef unsigned char uch

Definition at line 953 of file Unzip.cpp.

typedef unsigned int uInt

Definition at line 124 of file Unzip.cpp.

typedef unsigned long ulg

Definition at line 955 of file Unzip.cpp.

typedef unsigned long uLong

Definition at line 125 of file Unzip.cpp.

typedef unsigned short ush

Definition at line 954 of file Unzip.cpp.

typedef Byte* voidp

Definition at line 126 of file Unzip.cpp.

Enumeration Type Documentation

Enumerator
TYPE 
LENS 
STORED 
TABLE 
BTREE 
DTREE 
CODES 
DRY 
DONE 
BAD 

Definition at line 2544 of file Unzip.cpp.

Enumerator
START 
LEN 
LENEXT 
DIST 
DISTEXT 
COPY 
LIT 
WASH 
END 
BADCODE 

Definition at line 3799 of file Unzip.cpp.

Enumerator
imMETHOD 
imFLAG 
imDICT4 
imDICT3 
imDICT2 
imDICT1 
imDICT0 
imBLOCKS 
imCHECK4 
imCHECK3 
imCHECK2 
imCHECK1 
imDONE 
imBAD 

Definition at line 4118 of file Unzip.cpp.

Function Documentation

uLong adler32 ( uLong  adler,
const Byte buf,
uInt  len 
)

Definition at line 4053 of file Unzip.cpp.

uLong crc32 ( uLong  crc,
const Byte buf,
uInt  len 
)

Definition at line 2377 of file Unzip.cpp.

const uLong* get_crc_table ( )

Definition at line 2362 of file Unzip.cpp.

int inflate ( z_streamp  z,
int  f 
)

Definition at line 4249 of file Unzip.cpp.

int inflate_blocks ( inflate_blocks_statef s,
z_streamp  z,
int  r 
)

Definition at line 2726 of file Unzip.cpp.

int inflate_blocks_free ( inflate_blocks_statef s,
z_streamp  z 
)

Definition at line 2982 of file Unzip.cpp.

inflate_blocks_statef* inflate_blocks_new ( z_streamp  z,
check_func  c,
uInt  w 
)

Definition at line 2698 of file Unzip.cpp.

void inflate_blocks_reset ( inflate_blocks_statef s,
z_streamp  z,
uLong c 
)

Definition at line 2680 of file Unzip.cpp.

int inflate_blocks_sync_point ( inflate_blocks_statef s)

Definition at line 3004 of file Unzip.cpp.

int inflate_codes ( inflate_blocks_statef s,
z_streamp  z,
int  r 
)

Definition at line 3859 of file Unzip.cpp.

void inflate_codes_free ( inflate_codes_statef c,
z_streamp  z 
)

Definition at line 4026 of file Unzip.cpp.

inflate_codes_statef* inflate_codes_new ( uInt  bl,
uInt  bd,
inflate_huft tl,
inflate_huft td,
z_streamp  z 
)

Definition at line 3841 of file Unzip.cpp.

int inflate_fast ( uInt  bl,
uInt  bd,
inflate_huft tl,
inflate_huft td,
inflate_blocks_statef s,
z_streamp  z 
)

Definition at line 3651 of file Unzip.cpp.

int inflate_flush ( inflate_blocks_statef s,
z_streamp  z,
int  r 
)

Definition at line 3010 of file Unzip.cpp.

void inflate_set_dictionary ( inflate_blocks_statef s,
const Byte d,
uInt  n 
)

Definition at line 2993 of file Unzip.cpp.

int inflate_trees_bits ( uInt c,
uInt bb,
inflate_huft **  tb,
inflate_huft hp,
z_streamp  z 
)

Definition at line 3382 of file Unzip.cpp.

int inflate_trees_dynamic ( uInt  nl,
uInt  nd,
uInt c,
uInt bl,
uInt bd,
inflate_huft **  tl,
inflate_huft **  td,
inflate_huft hp,
z_streamp  z 
)

Definition at line 3409 of file Unzip.cpp.

int inflate_trees_fixed ( uInt bl,
uInt bd,
inflate_huft **  tl,
inflate_huft **  td,
z_streamp  z 
)

Definition at line 3624 of file Unzip.cpp.

int inflateEnd ( z_streamp  z)

Definition at line 4173 of file Unzip.cpp.

int inflateInit2_ ( z_streamp  z,
int  w,
const char *  version,
int  stream_size 
)

Definition at line 4187 of file Unzip.cpp.

int inflateInit_ ( z_streamp  z,
const char *  version,
int  stream_size 
)

Definition at line 4240 of file Unzip.cpp.

int inflateReset ( z_streamp  z)

Definition at line 4160 of file Unzip.cpp.

int inflateSetDictionary ( z_streamp  z,
const Byte dictionary,
uInt  dictLength 
)

Definition at line 4375 of file Unzip.cpp.

int inflateSync ( z_streamp  z)

Definition at line 4396 of file Unzip.cpp.

int inflateSyncPoint ( z_streamp  z)

Definition at line 4453 of file Unzip.cpp.

const char* zlibVersion OF ( (void )
int deflate OF ( (z_streamp strm, int flush)  )
int deflateEnd OF ( (z_streamp strm)  )
int deflateSetDictionary OF ( (z_streamp strm, const Byte *dictionary, uIntdictLength)  )
int deflateCopy OF ( (z_streamp dest, z_streamp source )
int deflateParams OF ( (z_streamp strm, int level, int strategy)  )
int compress OF ( (Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen)  )
int compress2 OF ( (Byte *dest, uLong *destLen, const Byte *source, uLong sourceLen, int level )
gzFile gzopen OF ( (const char *path, const char *mode )
gzFile gzdopen OF ( (int fd, const char *mode )
int gzsetparams OF ( (gzFile file, int level, int strategy)  )
int gzread OF ( (gzFile file, voidp buf, unsigned len )
int gzprintf OF ( (gzFile file, const char *format,...)  )
int gzputs OF ( (gzFile file, const char *s )
char* gzgets OF ( (gzFile file, char *buf, int len )
int gzputc OF ( (gzFile file, int c )
int gzgetc OF ( (gzFile file)  )
int gzflush OF ( (gzFile file, int flush)  )
long gzseek OF ( (gzFile file, long offset, int whence)  )
const char* gzerror OF ( (gzFile file, int *errnum)  )
uLong adler32 OF ( (uLong adler, const Byte *buf, uInt len )
uLong crc32 OF ( (uLong crc, const Byte *buf, uInt len )
int deflateInit_ OF ( (z_streamp strm, int level, const char *version, int stream_size)  )
int inflateInit_ OF ( (z_streamp strm, const char *version, int stream_size)  )
int deflateInit2_ OF ( (z_streamp strm, intlevel, intmethod, int windowBits, int memLevel, int strategy, const char *version, int stream_size)  )
int inflateInit2_ OF ( (z_streamp strm, intwindowBits, const char *version, int stream_size)  )
const char* zError OF ( (int err )
voidp zcalloc OF ( (voidp opaque, unsigned items, unsigned size )
void zcfree OF ( (voidp opaque, voidp ptr)  )
int unzClose ( unzFile  file)

Definition at line 1404 of file Unzip.cpp.

int unzCloseCurrentFile ( unzFile  file)

Definition at line 2172 of file Unzip.cpp.

int unzeof ( unzFile  file)

Definition at line 2096 of file Unzip.cpp.

int unzGetCurrentFileInfo ( unzFile  file,
unz_file_info pfile_info,
char *  szFileName,
uLong  fileNameBufferSize,
void extraField,
uLong  extraFieldBufferSize,
char *  szComment,
uLong  commentBufferSize 
)

Definition at line 1612 of file Unzip.cpp.

int unzGetCurrentFileInfoPosition ( unzFile  file,
unsigned long *  pos 
)

Definition at line 1675 of file Unzip.cpp.

int unzGetGlobalComment ( unzFile  file,
char *  szComment,
uLong  uSizeBuf 
)

Definition at line 2213 of file Unzip.cpp.

int unzGetGlobalInfo ( unzFile  file,
unz_global_info pglobal_info 
)

Definition at line 1424 of file Unzip.cpp.

int unzGetLocalExtrafield ( unzFile  file,
void buf,
unsigned  len 
)

Definition at line 2128 of file Unzip.cpp.

int unzGoToFirstFile ( unzFile  file)

Definition at line 1627 of file Unzip.cpp.

int unzGoToNextFile ( unzFile  file)

Definition at line 1648 of file Unzip.cpp.

int unzLocateFile ( unzFile  file,
const char *  szFileName,
int  iCaseSensitivity 
)

Definition at line 1716 of file Unzip.cpp.

unzFile unzOpen ( const char *  path)

Definition at line 1309 of file Unzip.cpp.

int unzOpenCurrentFile ( unzFile  file)

Definition at line 1852 of file Unzip.cpp.

int unzReadCurrentFile ( unzFile  file,
void buf,
unsigned  len 
)

Definition at line 1952 of file Unzip.cpp.

unzFile unzReOpen ( const char *  path,
unzFile  file 
)

Definition at line 1282 of file Unzip.cpp.

int unzSetCurrentFileInfoPosition ( unzFile  file,
unsigned long  pos 
)

Definition at line 1691 of file Unzip.cpp.

int unzStringFileNameCompare ( const char *  fileName1,
const char *  fileName2,
int  iCaseSensitivity 
)

Definition at line 1210 of file Unzip.cpp.

long unztell ( unzFile  file)

Definition at line 2077 of file Unzip.cpp.

voidp zcalloc ( voidp  opaque,
unsigned  items,
unsigned  size 
)

Definition at line 4460 of file Unzip.cpp.

void zcfree ( voidp  opaque,
voidp  ptr 
)

Definition at line 4466 of file Unzip.cpp.

Variable Documentation

const char inflate_copyright[]
Initial value:
=
" inflate 1.1.3 Copyright 1995-1998 Mark Adler "

Definition at line 3102 of file Unzip.cpp.

const char* z_errmsg[10]