54 #ifndef CPL_MINIZIP_UNZIP_H_INCLUDED
55 #define CPL_MINIZIP_UNZIP_H_INCLUDED
60 #define uLong64 vsi_l_offset
68 #include "cpl_zlib_header.h"
71 #ifndef CPL_MINIZIP_IOAPI_H_INCLUDED
72 #include "cpl_minizip_ioapi.h"
80 #if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
83 typedef struct TagunzFile__
87 typedef unzFile__ *unzFile;
89 typedef voidp unzFile;
93 #define UNZ_END_OF_LIST_OF_FILE (-100)
94 #define UNZ_ERRNO (Z_ERRNO)
96 #define UNZ_PARAMERROR (-102)
97 #define UNZ_BADZIPFILE (-103)
98 #define UNZ_INTERNALERROR (-104)
99 #define UNZ_CRCERROR (-105)
102 typedef struct tm_unz_s
114 typedef struct unz_global_info_s
116 uLong64 number_entry;
122 typedef struct unz_file_info_s
125 uLong version_needed;
127 uLong compression_method;
130 uLong64 compressed_size;
131 uLong64 uncompressed_size;
134 file_extra_abs_offset;
135 uLong size_file_extra;
136 uLong size_file_comment;
138 uLong disk_num_start;
145 extern int ZEXPORT cpl_unzStringFileNameCompare(
const char *fileName1,
146 const char *fileName2,
147 int iCaseSensitivity);
157 extern unzFile ZEXPORT cpl_unzOpen(
const char *path);
168 extern unzFile ZEXPORT cpl_unzOpen2(
const char *path,
169 zlib_filefunc_def *pzlib_filefunc_def);
175 extern int ZEXPORT cpl_unzClose(unzFile file);
182 extern int ZEXPORT cpl_unzGetGlobalInfo(unzFile file,
183 unz_global_info *pglobal_info);
189 extern int ZEXPORT cpl_unzGetGlobalComment(unzFile file,
char *szComment,
200 extern int ZEXPORT cpl_unzGoToFirstFile(unzFile file);
206 extern int ZEXPORT cpl_unzGoToNextFile(unzFile file);
213 extern int ZEXPORT cpl_unzLocateFile(unzFile file,
const char *szFileName,
214 int iCaseSensitivity);
227 typedef struct unz_file_pos_s
229 uLong64 pos_in_zip_directory;
233 extern int ZEXPORT cpl_unzGetFilePos(unzFile file, unz_file_pos *file_pos);
235 extern int ZEXPORT cpl_unzGoToFilePos(unzFile file, unz_file_pos *file_pos);
239 extern int ZEXPORT cpl_unzGetCurrentFileInfo(
240 unzFile file, unz_file_info *pfile_info,
char *szFileName,
241 uLong fileNameBufferSize,
void *extraField, uLong extraFieldBufferSize,
242 char *szComment, uLong commentBufferSize);
257 extern uLong64 ZEXPORT cpl_unzGetCurrentFileZStreamPos(unzFile file);
259 extern int cpl_unzGetLocalHeaderPos(unzFile file,
260 uLong64 *pos_local_header);
262 extern int cpl_unzCurrentFileInfoFromLocalHeader(
263 unzFile file, uLong64 pos_local_header, unz_file_info *pfile_info,
264 char *szFileName,
size_t fileNameBufferSize, uLong64 *posData);
273 extern int ZEXPORT cpl_unzOpenCurrentFile(unzFile file);
279 extern int ZEXPORT cpl_unzOpenCurrentFilePassword(unzFile file,
280 const char *password);
287 extern int ZEXPORT cpl_unzOpenCurrentFile2(unzFile file,
int *method,
288 int *level,
int raw);
297 extern int ZEXPORT cpl_unzOpenCurrentFile3(unzFile file,
int *method,
299 const char *password);
308 extern int ZEXPORT cpl_unzCloseCurrentFile(unzFile file);
314 extern int ZEXPORT cpl_unzReadCurrentFile(unzFile file, voidp buf,
327 extern z_off_t ZEXPORT cpl_unztell(unzFile file);
332 extern int ZEXPORT cpl_unzeof(unzFile file);
337 extern int ZEXPORT cpl_unzGetLocalExtrafield(unzFile file, voidp buf,
355 extern uLong64 ZEXPORT cpl_unzGetOffset(unzFile file);
358 extern int ZEXPORT cpl_unzSetOffset(unzFile file, uLong64 pos);