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__
88 typedef unzFile__ *unzFile;
90 typedef voidp unzFile;
94 #define UNZ_END_OF_LIST_OF_FILE (-100)
95 #define UNZ_ERRNO (Z_ERRNO)
97 #define UNZ_PARAMERROR (-102)
98 #define UNZ_BADZIPFILE (-103)
99 #define UNZ_INTERNALERROR (-104)
100 #define UNZ_CRCERROR (-105)
103 typedef struct tm_unz_s
115 typedef struct unz_global_info_s
117 uLong64 number_entry;
123 typedef struct unz_file_info_s
126 uLong version_needed;
128 uLong compression_method;
131 uLong64 compressed_size;
132 uLong64 uncompressed_size;
135 file_extra_abs_offset;
136 uLong size_file_extra;
137 uLong size_file_comment;
139 uLong disk_num_start;
146 extern int ZEXPORT cpl_unzStringFileNameCompare(
const char *fileName1,
147 const char *fileName2,
148 int iCaseSensitivity);
158 extern unzFile ZEXPORT cpl_unzOpen(
const char *path);
169 extern unzFile ZEXPORT cpl_unzOpen2(
const char *path,
170 zlib_filefunc_def *pzlib_filefunc_def);
176 extern int ZEXPORT cpl_unzClose(unzFile file);
183 extern int ZEXPORT cpl_unzGetGlobalInfo(unzFile file,
184 unz_global_info *pglobal_info);
190 extern int ZEXPORT cpl_unzGetGlobalComment(unzFile file,
char *szComment,
201 extern int ZEXPORT cpl_unzGoToFirstFile(unzFile file);
207 extern int ZEXPORT cpl_unzGoToNextFile(unzFile file);
214 extern int ZEXPORT cpl_unzLocateFile(unzFile file,
const char *szFileName,
215 int iCaseSensitivity);
229 typedef struct unz_file_pos_s
231 uLong64 pos_in_zip_directory;
235 extern int ZEXPORT cpl_unzGetFilePos(unzFile file, unz_file_pos *file_pos);
237 extern int ZEXPORT cpl_unzGoToFilePos(unzFile file, unz_file_pos *file_pos);
241 extern int ZEXPORT cpl_unzGetCurrentFileInfo(
242 unzFile file, unz_file_info *pfile_info,
char *szFileName,
243 uLong fileNameBufferSize,
void *extraField, uLong extraFieldBufferSize,
244 char *szComment, uLong commentBufferSize);
259 extern uLong64 ZEXPORT cpl_unzGetCurrentFileZStreamPos(unzFile file);
261 extern int cpl_unzGetLocalHeaderPos(unzFile file,
262 uLong64 *pos_local_header);
264 extern int cpl_unzCurrentFileInfoFromLocalHeader(
265 unzFile file, uLong64 pos_local_header, unz_file_info *pfile_info,
266 char *szFileName,
size_t fileNameBufferSize, uLong64 *posData);
275 extern int ZEXPORT cpl_unzOpenCurrentFile(unzFile file);
281 extern int ZEXPORT cpl_unzOpenCurrentFilePassword(unzFile file,
282 const char *password);
289 extern int ZEXPORT cpl_unzOpenCurrentFile2(unzFile file,
int *method,
290 int *level,
int raw);
299 extern int ZEXPORT cpl_unzOpenCurrentFile3(unzFile file,
int *method,
301 const char *password);
310 extern int ZEXPORT cpl_unzCloseCurrentFile(unzFile file);
316 extern int ZEXPORT cpl_unzReadCurrentFile(unzFile file, voidp buf,
329 extern z_off_t ZEXPORT cpl_unztell(unzFile file);
334 extern int ZEXPORT cpl_unzeof(unzFile file);
339 extern int ZEXPORT cpl_unzGetLocalExtrafield(unzFile file, voidp buf,
357 extern uLong64 ZEXPORT cpl_unzGetOffset(unzFile file);
360 extern int ZEXPORT cpl_unzSetOffset(unzFile file, uLong64 pos);