72 typedef uint64_t ZPOS64_T;
74 #define ZLIB_FILEFUNC_SEEK_CUR (1)
75 #define ZLIB_FILEFUNC_SEEK_END (2)
76 #define ZLIB_FILEFUNC_SEEK_SET (0)
78 #define ZLIB_FILEFUNC_MODE_READ (1)
79 #define ZLIB_FILEFUNC_MODE_WRITE (2)
80 #define ZLIB_FILEFUNC_MODE_READWRITEFILTER (3)
82 #define ZLIB_FILEFUNC_MODE_EXISTING (4)
83 #define ZLIB_FILEFUNC_MODE_CREATE (8)
85 static voidpf fopen_func(
const void* filename,
int mode);
86 static ZPOS64_T ftell_func(voidpf stream);
87 static int fseek_func(voidpf stream, ZPOS64_T offset,
int origin);
88 static size_t fread_func(voidpf stream,
void* buf,
size_t size);
89 static int fclose_func(voidpf stream);
90 static int ferror_func(voidpf stream);
99 typedef voidp unzFile;
102 #define UNZ_END_OF_LIST_OF_FILE (-100)
103 #define UNZ_ERRNO (Z_ERRNO)
105 #define UNZ_PARAMERROR (-102)
106 #define UNZ_BADZIPFILE (-103)
107 #define UNZ_INTERNALERROR (-104)
108 #define UNZ_CRCERROR (-105)
111 typedef struct tm_unz_s
121 typedef struct unz_global_info64_s
123 ZPOS64_T number_entry;
129 typedef struct unz_file_info64_s
132 uLong version_needed;
134 uLong compression_method;
137 ZPOS64_T compressed_size;
138 ZPOS64_T uncompressed_size;
140 uLong size_file_extra;
141 uLong size_file_comment;
143 uLong disk_num_start;
151 int unzStringFileNameCompare OF ((
const char* fileName1,
152 const char* fileName2,
153 int iCaseSensitivity));
155 unzFile unzOpen64 OF((
const void *path));
158 int unzClose OF((unzFile file));
160 static int unzGetGlobalInfo64 OF((unzFile file,
161 unz_global_info64 *pglobal_info));
167 int unzGoToFirstFile OF((unzFile file));
173 int unzGoToNextFile OF((unzFile file));
180 int unzLocateFile OF((unzFile file,
181 const char *szFileName,
182 int iCaseSensitivity));
196 int unzGetCurrentFileInfo64 OF((unzFile file,
197 unz_file_info64 *pfile_info,
199 uLong fileNameBufferSize,
201 uLong extraFieldBufferSize,
203 uLong commentBufferSize));
223 int unzOpenCurrentFile OF((unzFile file));
229 int unzCloseCurrentFile OF((unzFile file));
235 int unzReadCurrentFile OF((unzFile file,