53#ifndef CPL_MINIZIP_UNZIP_H_INCLUDED
54#define CPL_MINIZIP_UNZIP_H_INCLUDED
59#define uLong64 vsi_l_offset
67#include "cpl_zlib_header.h"
70#ifndef CPL_MINIZIP_IOAPI_H_INCLUDED
71#include "cpl_minizip_ioapi.h"
79#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
82 typedef struct TagunzFile__
87 typedef unzFile__ *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);
228 typedef struct unz_file_pos_s
230 uLong64 pos_in_zip_directory;
234 extern int ZEXPORT cpl_unzGetFilePos(unzFile file, unz_file_pos *file_pos);
236 extern int ZEXPORT cpl_unzGoToFilePos(unzFile file, unz_file_pos *file_pos);
240 extern int ZEXPORT cpl_unzGetCurrentFileInfo(
241 unzFile file, unz_file_info *pfile_info,
char *szFileName,
242 uLong fileNameBufferSize,
void *extraField, uLong extraFieldBufferSize,
243 char *szComment, uLong commentBufferSize);
258 extern uLong64 ZEXPORT cpl_unzGetCurrentFileZStreamPos(unzFile file);
260 extern int cpl_unzGetLocalHeaderPos(unzFile file,
261 uLong64 *pos_local_header);
263 extern int cpl_unzCurrentFileInfoFromLocalHeader(
264 unzFile file, uLong64 pos_local_header, unz_file_info *pfile_info,
265 char *szFileName,
size_t fileNameBufferSize, uLong64 *posData);
274 extern int ZEXPORT cpl_unzOpenCurrentFile(unzFile file);
280 extern int ZEXPORT cpl_unzOpenCurrentFilePassword(unzFile file,
281 const char *password);
288 extern int ZEXPORT cpl_unzOpenCurrentFile2(unzFile file,
int *method,
289 int *level,
int raw);
298 extern int ZEXPORT cpl_unzOpenCurrentFile3(unzFile file,
int *method,
300 const char *password);
309 extern int ZEXPORT cpl_unzCloseCurrentFile(unzFile file);
315 extern int ZEXPORT cpl_unzReadCurrentFile(unzFile file, voidp buf,
328 extern z_off_t ZEXPORT cpl_unztell(unzFile file);
333 extern int ZEXPORT cpl_unzeof(unzFile file);
338 extern int ZEXPORT cpl_unzGetLocalExtrafield(unzFile file, voidp buf,
356 extern uLong64 ZEXPORT cpl_unzGetOffset(unzFile file);
359 extern int ZEXPORT cpl_unzSetOffset(unzFile file, uLong64 pos);