fintp_base
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
unzip.cpp File Reference
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <tchar.h>
#include "unzip.h"

Classes

struct  tm_unz_s
 
struct  unz_global_info_s
 
struct  unz_file_info_s
 
struct  z_stream_s
 
struct  inflate_huft_s
 
struct  inflate_blocks_state
 
struct  inflate_codes_state
 
struct  internal_state
 
struct  unz_file_info_internal_s
 
struct  LUFILE
 
struct  file_in_zip_read_info_s
 
struct  unz_s
 
class  TUnzip
 
struct  TUnzipHandleData
 

Macros

#define ZIP_HANDLE   1
 
#define ZIP_FILENAME   2
 
#define ZIP_MEMORY   3
 
#define zmalloc(len)   malloc(len)
 
#define zfree(p)   free(p)
 
#define UNZ_OK   (0)
 
#define UNZ_END_OF_LIST_OF_FILE   (-100)
 
#define UNZ_ERRNO   (Z_ERRNO)
 
#define UNZ_EOF   (0)
 
#define UNZ_PARAMERROR   (-102)
 
#define UNZ_BADZIPFILE   (-103)
 
#define UNZ_INTERNALERROR   (-104)
 
#define UNZ_CRCERROR   (-105)
 
#define UNZ_PASSWORD   (-106)
 
#define ZLIB_VERSION   "1.1.3"
 
#define Z_NO_FLUSH   0
 
#define Z_SYNC_FLUSH   2
 
#define Z_FULL_FLUSH   3
 
#define Z_FINISH   4
 
#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
 
#define CASE_SENSITIVE   1
 
#define CASE_INSENSITIVE   2
 
#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 ERR_MSG(err)   z_errmsg[Z_NEED_DICT-(err)]
 
#define ERR_RETURN(strm, err)   return (strm->msg = (char*)ERR_MSG(err), (err))
 
#define STORED_BLOCK   0
 
#define STATIC_TREES   1
 
#define DYN_TREES   2
 
#define MIN_MATCH   3
 
#define MAX_MATCH   258
 
#define PRESET_DICT   0x20
 
#define OS_CODE   0x0b
 
#define zmemzero(dest, len)   memset(dest, 0, len)
 
#define LuAssert(cond, msg)
 
#define LuTrace(x)
 
#define LuTracev(x)
 
#define LuTracevv(x)
 
#define LuTracec(c, x)
 
#define LuTracecv(c, x)
 
#define ZALLOC(strm, items, size)   (*((strm)->zalloc))((strm)->opaque, (items), (size))
 
#define ZFREE(strm, addr)   (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
 
#define TRY_FREE(s, p)   {if (p) ZFREE(s, p);}
 
#define MANY   1440
 
#define UPDBITS   {s->bitb=b;s->bitk=k;}
 
#define UPDIN   {z->avail_in=n;z->total_in+=(uLong)(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;m;}
 
#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
 
#define C0   *p++ = 0;
 
#define C2   C0 C0 C0 C0
 
#define C4   C2 C2 C2 C2
 
#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 CRC_DO1(buf)   crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
 
#define CRC_DO2(buf)   CRC_DO1(buf); CRC_DO1(buf);
 
#define CRC_DO4(buf)   CRC_DO2(buf); CRC_DO2(buf);
 
#define CRC_DO8(buf)   CRC_DO4(buf); CRC_DO4(buf);
 
#define CRC32(c, b)   (crc_table[((int)(c)^(b))&0xff]^((c)>>8))
 
#define BASE   65521L
 
#define NMAX   5552
 
#define AD_DO1(buf, i)   {s1 += buf[i]; s2 += s1;}
 
#define AD_DO2(buf, i)   AD_DO1(buf,i); AD_DO1(buf,i+1);
 
#define AD_DO4(buf, i)   AD_DO2(buf,i); AD_DO2(buf,i+2);
 
#define AD_DO8(buf, i)   AD_DO4(buf,i); AD_DO4(buf,i+4);
 
#define AD_DO16(buf)   AD_DO8(buf,0); AD_DO8(buf,8);
 
#define IM_NEEDBYTE   {if(z->avail_in==0)return r;r=f;}
 
#define IM_NEXTBYTE   (z->avail_in--,z->total_in++,*z->next_in++)
 
#define UNZ_BUFSIZE   (16384)
 
#define UNZ_MAXFILENAMEINZIP   (256)
 
#define SIZECENTRALDIRITEM   (0x2e)
 
#define SIZEZIPLOCALHEADER   (0x1e)
 
#define BUFREADCOMMENT   (0x400)
 

Typedefs

typedef struct tm_unz_s tm_unz
 
typedef struct unz_global_info_s unz_global_info
 
typedef struct unz_file_info_s unz_file_info
 
typedef unsigned char Byte
 
typedef unsigned int uInt
 
typedef unsigned long uLong
 
typedef void * voidpf
 
typedef void * voidp
 
typedef long z_off_t
 
typedef voidpf(* alloc_func )(voidpf opaque, uInt items, uInt size)
 
typedef void(* free_func )(voidpf opaque, voidpf address)
 
typedef struct z_stream_s z_stream
 
typedef z_streamz_streamp
 
typedef unsigned char uch
 
typedef uch uchf
 
typedef unsigned short ush
 
typedef ush ushf
 
typedef unsigned long ulg
 
typedef uLong(* check_func )(uLong check, const Byte *buf, uInt len)
 
typedef struct inflate_huft_s inflate_huft
 
typedef struct inflate_blocks_state inflate_blocks_statef
 
typedef struct inflate_codes_state inflate_codes_statef
 
typedef struct
unz_file_info_internal_s 
unz_file_info_internal
 
typedef struct unz_sunzFile
 
typedef unsigned __int32 lutime_t
 

Enumerations

enum  inflate_block_mode {
  IBM_TYPE, IBM_LENS, IBM_STORED, IBM_TABLE,
  IBM_BTREE, IBM_DTREE, IBM_CODES, IBM_DRY,
  IBM_DONE, IBM_BAD
}
 
enum  inflate_codes_mode {
  START, LEN, LENEXT, DIST,
  DISTEXT, COPY, LIT, WASH,
  END, BADCODE
}
 
enum  inflate_mode {
  IM_METHOD, IM_FLAG, IM_DICT4, IM_DICT3,
  IM_DICT2, IM_DICT1, IM_DICT0, IM_BLOCKS,
  IM_CHECK4, IM_CHECK3, IM_CHECK2, IM_CHECK1,
  IM_DONE, IM_BAD
}
 

Functions

const char * zlibVersion ()
 
int inflate (z_streamp strm, int flush)
 
int inflateEnd (z_streamp strm)
 
int inflateSetDictionary (z_streamp strm, const Byte *dictionary, uInt dictLength)
 
int inflateSync (z_streamp strm)
 
int inflateReset (z_streamp strm)
 
uLong adler32 (uLong adler, const Byte *buf, uInt len)
 
uLong ucrc32 (uLong crc, const Byte *buf, uInt len)
 
const char * zError (int err)
 
int inflateSyncPoint (z_streamp z)
 
const uLongget_crc_table (void)
 
voidpf zcalloc (voidpf opaque, unsigned items, unsigned size)
 
void zcfree (voidpf opaque, voidpf ptr)
 
int inflate_trees_bits (uInt *, uInt *, inflate_huft **, inflate_huft *, z_streamp)
 
int inflate_trees_dynamic (uInt, uInt, uInt *, uInt *, uInt *, inflate_huft **, inflate_huft **, inflate_huft *, z_streamp)
 
int inflate_trees_fixed (uInt *, uInt *, const inflate_huft **, const inflate_huft **, z_streamp)
 
inflate_blocks_statefinflate_blocks_new (z_streamp z, check_func c, uInt w)
 
int inflate_blocks (inflate_blocks_statef *, z_streamp, int)
 
void inflate_blocks_reset (inflate_blocks_statef *, z_streamp, uLong *)
 
int inflate_blocks_free (inflate_blocks_statef *, z_streamp)
 
void inflate_set_dictionary (inflate_blocks_statef *s, const Byte *d, uInt n)
 
int inflate_blocks_sync_point (inflate_blocks_statef *s)
 
inflate_codes_statefinflate_codes_new (uInt, uInt, const inflate_huft *, const inflate_huft *, z_streamp)
 
int inflate_codes (inflate_blocks_statef *, z_streamp, int)
 
void inflate_codes_free (inflate_codes_statef *, z_streamp)
 
int inflate_flush (inflate_blocks_statef *, z_streamp, int)
 
int inflate_fast (uInt, uInt, const inflate_huft *, const inflate_huft *, inflate_blocks_statef *, z_streamp)
 
int huft_build (uInt *, uInt, uInt, const uInt *, const uInt *, inflate_huft **, uInt *, inflate_huft *, uInt *, uInt *)
 
void Uupdate_keys (unsigned long *keys, char c)
 
char Udecrypt_byte (unsigned long *keys)
 
char zdecode (unsigned long *keys, char c)
 
int inflateInit2 (z_streamp z)
 
LUFILElufopen (void *z, unsigned int len, DWORD flags, ZRESULT *err)
 
int lufclose (LUFILE *stream)
 
int luferror (LUFILE *stream)
 
long int luftell (LUFILE *stream)
 
int lufseek (LUFILE *stream, long offset, int whence)
 
size_t lufread (void *ptr, size_t size, size_t n, LUFILE *stream)
 
int unzStringFileNameCompare (const char *fileName1, const char *fileName2, int iCaseSensitivity)
 
z_off_t unztell (unzFile file)
 
int unzeof (unzFile file)
 
int unzGetLocalExtrafield (unzFile file, voidp buf, unsigned len)
 
int unzlocal_getByte (LUFILE *fin, int *pi)
 
int unzlocal_getShort (LUFILE *fin, uLong *pX)
 
int unzlocal_getLong (LUFILE *fin, uLong *pX)
 
int strcmpcasenosensitive_internal (const char *fileName1, const char *fileName2)
 
uLong unzlocal_SearchCentralDir (LUFILE *fin)
 
int unzGoToFirstFile (unzFile file)
 
int unzCloseCurrentFile (unzFile file)
 
unzFile unzOpenInternal (LUFILE *fin)
 
int unzClose (unzFile file)
 
int unzGetGlobalInfo (unzFile file, unz_global_info *pglobal_info)
 
void unzlocal_DosDateToTmuDate (uLong ulDosDate, tm_unz *ptm)
 
int unzlocal_GetCurrentFileInfoInternal (unzFile file, unz_file_info *pfile_info, unz_file_info_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)
 
int unzGetCurrentFileInfo (unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)
 
int unzGoToNextFile (unzFile file)
 
int unzLocateFile (unzFile file, const char *szFileName, int iCaseSensitivity)
 
int unzlocal_CheckCurrentFileCoherencyHeader (unz_s *s, uInt *piSizeVar, uLong *poffset_local_extrafield, uInt *psize_local_extrafield)
 
int unzOpenCurrentFile (unzFile file, const char *password)
 
int unzReadCurrentFile (unzFile file, voidp buf, unsigned len, bool *reached_eof)
 
int unzGetGlobalComment (unzFile file, char *szComment, uLong uSizeBuf)
 
int unzReadCurrentFile (unzFile file, void *buf, unsigned len)
 
FILETIME timet2filetime (const lutime_t t)
 
FILETIME dosdatetime2filetime (WORD dosdate, WORD dostime)
 
void EnsureDirectory (const TCHAR *rootdir, const TCHAR *dir)
 
unsigned int FormatZipMessageU (ZRESULT code, TCHAR *buf, unsigned int len)
 
HZIP OpenZipInternal (void *z, unsigned int len, DWORD flags, const char *password)
 
HZIP OpenZipHandle (HANDLE h, const char *password)
 
HZIP OpenZip (const TCHAR *fn, const char *password)
 
HZIP OpenZip (void *z, unsigned int len, const char *password)
 
ZRESULT GetZipItem (HZIP hz, int index, ZIPENTRY *ze)
 
ZRESULT FindZipItem (HZIP hz, const TCHAR *name, bool ic, int *index, ZIPENTRY *ze)
 
ZRESULT UnzipItemInternal (HZIP hz, int index, void *dst, unsigned int len, DWORD flags)
 
ZRESULT UnzipItemHandle (HZIP hz, int index, HANDLE h)
 
ZRESULT UnzipItem (HZIP hz, int index, const TCHAR *fn)
 
ZRESULT UnzipItem (HZIP hz, int index, void *z, unsigned int len)
 
ZRESULT SetUnzipBaseDir (HZIP hz, const TCHAR *dir)
 
ZRESULT CloseZipU (HZIP hz)
 
bool IsZipHandleU (HZIP hz)
 

Variables

const char *const z_errmsg [10]
 
const uInt inflate_mask [17]
 
const uInt fixed_bl = 9
 
const uInt fixed_bd = 5
 
const inflate_huft fixed_tl []
 
const inflate_huft fixed_td []
 
const uInt border []
 
const char inflate_copyright []
 
const uInt cplens [31]
 
const uInt cplext [31]
 
const uInt cpdist [30]
 
const uInt cpdext [30]
 
const uLong crc_table [256]
 
const char unz_copyright [] = " unzip 0.15 Copyright 1998 Gilles Vollant "
 
ZRESULT lasterrorU =ZR_OK
 

Macro Definition Documentation

#define AD_DO1 (   buf,
 
)    {s1 += buf[i]; s2 += s1;}
#define AD_DO16 (   buf)    AD_DO8(buf,0); AD_DO8(buf,8);
#define AD_DO2 (   buf,
 
)    AD_DO1(buf,i); AD_DO1(buf,i+1);
#define AD_DO4 (   buf,
 
)    AD_DO2(buf,i); AD_DO2(buf,i+2);
#define AD_DO8 (   buf,
 
)    AD_DO4(buf,i); AD_DO4(buf,i+4);
#define BASE   65521L
#define bits   word.what.Bits
#define BMAX   15
#define BUFREADCOMMENT   (0x400)
#define C0   *p++ = 0;
#define C2   C0 C0 C0 C0
#define C4   C2 C2 C2 C2
#define CASE_INSENSITIVE   2
#define CASE_SENSITIVE   1
#define CRC32 (   c,
 
)    (crc_table[((int)(c)^(b))&0xff]^((c)>>8))
#define CRC_DO1 (   buf)    crc = crc_table[((int)crc ^ (*buf++)) & 0xff] ^ (crc >> 8);
#define CRC_DO2 (   buf)    CRC_DO1(buf); CRC_DO1(buf);
#define CRC_DO4 (   buf)    CRC_DO2(buf); CRC_DO2(buf);
#define CRC_DO8 (   buf)    CRC_DO4(buf); CRC_DO4(buf);
#define DUMPBITS (   j)    {b>>=(j);k-=(j);}
#define DYN_TREES   2
#define ERR_MSG (   err)    z_errmsg[Z_NEED_DICT-(err)]
#define ERR_RETURN (   strm,
  err 
)    return (strm->msg = (char*)ERR_MSG(err), (err))
#define exop   word.what.Exop
#define FLUSH   {UPDOUT r=inflate_flush(s,z,r); LOADOUT}
#define GRABBITS (   j)    {while(k<(j)){b|=((uLong)NEXTBYTE)<<k;k+=8;}}
#define IM_NEEDBYTE   {if(z->avail_in==0)return r;r=f;}
#define IM_NEXTBYTE   (z->avail_in--,z->total_in++,*z->next_in++)
#define LEAVE   {UPDATE return inflate_flush(s,z,r);}
#define LOAD   {LOADIN LOADOUT}
#define LOADIN   {p=z->next_in;n=z->avail_in;b=s->bitb;k=s->bitk;}
#define LOADOUT   {q=s->write;m=(uInt)WAVAIL;m;}
#define LuAssert (   cond,
  msg 
)
#define LuTrace (   x)
#define LuTracec (   c,
 
)
#define LuTracecv (   c,
 
)
#define LuTracev (   x)
#define LuTracevv (   x)
#define MANY   1440
#define MAX_MATCH   258
#define MIN_MATCH   3
#define NEEDBITS (   j)    {while(k<(j)){NEEDBYTE;b|=((uLong)NEXTBYTE)<<k;k+=8;}}
#define NEEDBYTE   {if(n)r=Z_OK;else LEAVE}
#define NEEDOUT   {if(m==0){WRAP if(m==0){FLUSH WRAP if(m==0) LEAVE}}r=Z_OK;}
#define NEXTBYTE   (n--,*p++)
#define NMAX   5552
#define OS_CODE   0x0b
#define OUTBYTE (   a)    {*q++=(Byte)(a);m--;}
#define PRESET_DICT   0x20
#define SIZECENTRALDIRITEM   (0x2e)
#define SIZEZIPLOCALHEADER   (0x1e)
#define STATIC_TREES   1
#define STORED_BLOCK   0
#define TRY_FREE (   s,
 
)    {if (p) ZFREE(s, p);}
#define UNGRAB   {c=z->avail_in-n;c=(k>>3)<c?k>>3:c;n+=c;p-=c;k-=c<<3;}
#define UNZ_BADZIPFILE   (-103)
#define UNZ_BUFSIZE   (16384)
#define UNZ_CRCERROR   (-105)
#define UNZ_END_OF_LIST_OF_FILE   (-100)
#define UNZ_EOF   (0)
#define UNZ_ERRNO   (Z_ERRNO)
#define UNZ_INTERNALERROR   (-104)
#define UNZ_MAXFILENAMEINZIP   (256)
#define UNZ_OK   (0)
#define UNZ_PARAMERROR   (-102)
#define UNZ_PASSWORD   (-106)
#define UPDATE   {UPDBITS UPDIN UPDOUT}
#define UPDBITS   {s->bitb=b;s->bitk=k;}
#define UPDIN   {z->avail_in=n;z->total_in+=(uLong)(p-z->next_in);z->next_in=p;}
#define UPDOUT   {s->write=q;}
#define WAVAIL   (uInt)(q<s->read?s->read-q-1:s->end-q)
#define WRAP   {if(q==s->end&&s->read!=s->window){q=s->window;m=(uInt)WAVAIL;}}
#define Z_ASCII   1
#define Z_BEST_COMPRESSION   9
#define Z_BEST_SPEED   1
#define Z_BINARY   0
#define Z_BUF_ERROR   (-5)
#define Z_DATA_ERROR   (-3)
#define Z_DEFAULT_COMPRESSION   (-1)
#define Z_DEFAULT_STRATEGY   0
#define Z_DEFLATED   8
#define Z_ERRNO   (-1)
#define Z_FILTERED   1
#define Z_FINISH   4
#define Z_FULL_FLUSH   3
#define Z_HUFFMAN_ONLY   2
#define Z_MEM_ERROR   (-4)
#define Z_NEED_DICT   2
#define Z_NO_COMPRESSION   0
#define Z_NO_FLUSH   0
#define Z_NULL   0
#define Z_OK   0
#define Z_STREAM_END   1
#define Z_STREAM_ERROR   (-2)
#define Z_SYNC_FLUSH   2
#define Z_UNKNOWN   2
#define Z_VERSION_ERROR   (-6)
#define ZALLOC (   strm,
  items,
  size 
)    (*((strm)->zalloc))((strm)->opaque, (items), (size))
#define zfree (   p)    free(p)
#define ZFREE (   strm,
  addr 
)    (*((strm)->zfree))((strm)->opaque, (voidpf)(addr))
#define ZIP_FILENAME   2
#define ZIP_HANDLE   1
#define ZIP_MEMORY   3
#define ZLIB_VERSION   "1.1.3"
#define zmalloc (   len)    malloc(len)
#define zmemzero (   dest,
  len 
)    memset(dest, 0, len)

Typedef Documentation

typedef voidpf(* alloc_func)(voidpf opaque, uInt items, uInt size)
typedef unsigned char Byte
typedef uLong(* check_func)(uLong check, const Byte *buf, uInt len)
typedef void(* free_func)(voidpf opaque, voidpf address)
typedef struct inflate_huft_s inflate_huft
typedef unsigned __int32 lutime_t
typedef struct tm_unz_s tm_unz
typedef unsigned char uch
typedef uch uchf
typedef unsigned int uInt
typedef unsigned long ulg
typedef unsigned long uLong
typedef struct unz_s * unzFile
typedef unsigned short ush
typedef ush ushf
typedef void* voidp
typedef void* voidpf
typedef long z_off_t
typedef struct z_stream_s z_stream
typedef z_stream* z_streamp

Enumeration Type Documentation

Enumerator
IBM_TYPE 
IBM_LENS 
IBM_STORED 
IBM_TABLE 
IBM_BTREE 
IBM_DTREE 
IBM_CODES 
IBM_DRY 
IBM_DONE 
IBM_BAD 
Enumerator
START 
LEN 
LENEXT 
DIST 
DISTEXT 
COPY 
LIT 
WASH 
END 
BADCODE 
Enumerator
IM_METHOD 
IM_FLAG 
IM_DICT4 
IM_DICT3 
IM_DICT2 
IM_DICT1 
IM_DICT0 
IM_BLOCKS 
IM_CHECK4 
IM_CHECK3 
IM_CHECK2 
IM_CHECK1 
IM_DONE 
IM_BAD 

Function Documentation

uLong adler32 ( uLong  adler,
const Byte buf,
uInt  len 
)
ZRESULT CloseZipU ( HZIP  hz)
FILETIME dosdatetime2filetime ( WORD  dosdate,
WORD  dostime 
)
void EnsureDirectory ( const TCHAR *  rootdir,
const TCHAR *  dir 
)
ZRESULT FindZipItem ( HZIP  hz,
const TCHAR *  name,
bool  ic,
int *  index,
ZIPENTRY ze 
)
unsigned int FormatZipMessageU ( ZRESULT  code,
TCHAR *  buf,
unsigned int  len 
)
const uLong * get_crc_table ( void  )
ZRESULT GetZipItem ( HZIP  hz,
int  index,
ZIPENTRY ze 
)
int huft_build ( uInt b,
uInt  n,
uInt  s,
const uInt d,
const uInt e,
inflate_huft **  t,
uInt m,
inflate_huft hp,
uInt hn,
uInt v 
)
int inflate ( z_streamp  strm,
int  flush 
)
int inflate_blocks ( inflate_blocks_statef s,
z_streamp  z,
int  r 
)
int inflate_blocks_free ( inflate_blocks_statef s,
z_streamp  z 
)
inflate_blocks_statef * inflate_blocks_new ( z_streamp  z,
check_func  c,
uInt  w 
)
void inflate_blocks_reset ( inflate_blocks_statef s,
z_streamp  z,
uLong c 
)
int inflate_blocks_sync_point ( inflate_blocks_statef s)
int inflate_codes ( inflate_blocks_statef s,
z_streamp  z,
int  r 
)
void inflate_codes_free ( inflate_codes_statef c,
z_streamp  z 
)
inflate_codes_statef * inflate_codes_new ( uInt  bl,
uInt  bd,
const inflate_huft tl,
const inflate_huft td,
z_streamp  z 
)
int inflate_fast ( uInt  bl,
uInt  bd,
const inflate_huft tl,
const inflate_huft td,
inflate_blocks_statef s,
z_streamp  z 
)
int inflate_flush ( inflate_blocks_statef s,
z_streamp  z,
int  r 
)
void inflate_set_dictionary ( inflate_blocks_statef s,
const Byte d,
uInt  n 
)
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,
const inflate_huft **  tl,
const inflate_huft **  td,
z_streamp   
)
int inflateEnd ( z_streamp  strm)
int inflateInit2 ( z_streamp  z)
int inflateReset ( z_streamp  strm)
int inflateSetDictionary ( z_streamp  strm,
const Byte dictionary,
uInt  dictLength 
)
int inflateSync ( z_streamp  strm)
int inflateSyncPoint ( z_streamp  z)
bool IsZipHandleU ( HZIP  hz)
int lufclose ( LUFILE stream)
int luferror ( LUFILE stream)
LUFILE* lufopen ( void *  z,
unsigned int  len,
DWORD  flags,
ZRESULT err 
)
size_t lufread ( void *  ptr,
size_t  size,
size_t  n,
LUFILE stream 
)
int lufseek ( LUFILE stream,
long  offset,
int  whence 
)
long int luftell ( LUFILE stream)
HZIP OpenZip ( const TCHAR *  fn,
const char *  password 
)
HZIP OpenZip ( void *  z,
unsigned int  len,
const char *  password 
)
HZIP OpenZipHandle ( HANDLE  h,
const char *  password 
)
HZIP OpenZipInternal ( void *  z,
unsigned int  len,
DWORD  flags,
const char *  password 
)
ZRESULT SetUnzipBaseDir ( HZIP  hz,
const TCHAR *  dir 
)
int strcmpcasenosensitive_internal ( const char *  fileName1,
const char *  fileName2 
)
FILETIME timet2filetime ( const lutime_t  t)
uLong ucrc32 ( uLong  crc,
const Byte buf,
uInt  len 
)
char Udecrypt_byte ( unsigned long *  keys)
int unzClose ( unzFile  file)
int unzCloseCurrentFile ( unzFile  file)
int unzeof ( unzFile  file)
int unzGetCurrentFileInfo ( unzFile  file,
unz_file_info pfile_info,
char *  szFileName,
uLong  fileNameBufferSize,
void *  extraField,
uLong  extraFieldBufferSize,
char *  szComment,
uLong  commentBufferSize 
)
int unzGetGlobalComment ( unzFile  file,
char *  szComment,
uLong  uSizeBuf 
)
int unzGetGlobalInfo ( unzFile  file,
unz_global_info pglobal_info 
)
int unzGetLocalExtrafield ( unzFile  file,
voidp  buf,
unsigned  len 
)
int unzGoToFirstFile ( unzFile  file)
int unzGoToNextFile ( unzFile  file)
ZRESULT UnzipItem ( HZIP  hz,
int  index,
const TCHAR *  fn 
)
ZRESULT UnzipItem ( HZIP  hz,
int  index,
void *  z,
unsigned int  len 
)
ZRESULT UnzipItemHandle ( HZIP  hz,
int  index,
HANDLE  h 
)
ZRESULT UnzipItemInternal ( HZIP  hz,
int  index,
void *  dst,
unsigned int  len,
DWORD  flags 
)
int unzlocal_CheckCurrentFileCoherencyHeader ( unz_s s,
uInt piSizeVar,
uLong poffset_local_extrafield,
uInt psize_local_extrafield 
)
void unzlocal_DosDateToTmuDate ( uLong  ulDosDate,
tm_unz ptm 
)
int unzlocal_getByte ( LUFILE fin,
int *  pi 
)
int unzlocal_GetCurrentFileInfoInternal ( unzFile  file,
unz_file_info pfile_info,
unz_file_info_internal pfile_info_internal,
char *  szFileName,
uLong  fileNameBufferSize,
void *  extraField,
uLong  extraFieldBufferSize,
char *  szComment,
uLong  commentBufferSize 
)
int unzlocal_getLong ( LUFILE fin,
uLong pX 
)
int unzlocal_getShort ( LUFILE fin,
uLong pX 
)
uLong unzlocal_SearchCentralDir ( LUFILE fin)
int unzLocateFile ( unzFile  file,
const char *  szFileName,
int  iCaseSensitivity 
)
int unzOpenCurrentFile ( unzFile  file,
const char *  password 
)
unzFile unzOpenInternal ( LUFILE fin)
int unzReadCurrentFile ( unzFile  file,
voidp  buf,
unsigned  len,
bool *  reached_eof 
)
int unzReadCurrentFile ( unzFile  file,
void *  buf,
unsigned  len 
)
int unzStringFileNameCompare ( const char *  fileName1,
const char *  fileName2,
int  iCaseSensitivity 
)
z_off_t unztell ( unzFile  file)
void Uupdate_keys ( unsigned long *  keys,
char  c 
)
voidpf zcalloc ( voidpf  opaque,
unsigned  items,
unsigned  size 
)
void zcfree ( voidpf  opaque,
voidpf  ptr 
)
char zdecode ( unsigned long *  keys,
char  c 
)
const char * zError ( int  err)
const char * zlibVersion ( )

Variable Documentation

const uInt border[]
Initial value:
= {
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15}
const uInt cpdext[30]
Initial value:
= {
0, 0, 0, 0, 1, 1, 2, 2, 3, 3, 4, 4, 5, 5, 6, 6,
7, 7, 8, 8, 9, 9, 10, 10, 11, 11,
12, 12, 13, 13}
const uInt cpdist[30]
Initial value:
= {
1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193,
257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145,
8193, 12289, 16385, 24577}
const uInt cplens[31]
Initial value:
= {
3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 15, 17, 19, 23, 27, 31,
35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}
const uInt cplext[31]
Initial value:
= {
0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2,
3, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 0, 112, 112}
const uLong crc_table[256]
const uInt fixed_bd = 5
const uInt fixed_bl = 9
const inflate_huft fixed_td[]
Initial value:
= {
{{{80,5}},1}, {{{87,5}},257}, {{{83,5}},17}, {{{91,5}},4097},
{{{81,5}},5}, {{{89,5}},1025}, {{{85,5}},65}, {{{93,5}},16385},
{{{80,5}},3}, {{{88,5}},513}, {{{84,5}},33}, {{{92,5}},8193},
{{{82,5}},9}, {{{90,5}},2049}, {{{86,5}},129}, {{{192,5}},24577},
{{{80,5}},2}, {{{87,5}},385}, {{{83,5}},25}, {{{91,5}},6145},
{{{81,5}},7}, {{{89,5}},1537}, {{{85,5}},97}, {{{93,5}},24577},
{{{80,5}},4}, {{{88,5}},769}, {{{84,5}},49}, {{{92,5}},12289},
{{{82,5}},13}, {{{90,5}},3073}, {{{86,5}},193}, {{{192,5}},24577}
}
const inflate_huft fixed_tl[]
const char inflate_copyright[]
Initial value:
=
" inflate 1.1.3 Copyright 1995-1998 Mark Adler "
const uInt inflate_mask[17]
Initial value:
= {
0x0000,
0x0001, 0x0003, 0x0007, 0x000f, 0x001f, 0x003f, 0x007f, 0x00ff,
0x01ff, 0x03ff, 0x07ff, 0x0fff, 0x1fff, 0x3fff, 0x7fff, 0xffff
}
ZRESULT lasterrorU =ZR_OK
const char unz_copyright[] = " unzip 0.15 Copyright 1998 Gilles Vollant "
const char* const z_errmsg[10]
Initial value:
= {
"need dictionary",
"stream end",
"",
"file error",
"stream error",
"data error",
"insufficient memory",
"buffer error",
"incompatible version",
""}