54#ifndef CPL_MINIZIP_UNZIP_H_INCLUDED
55#define CPL_MINIZIP_UNZIP_H_INCLUDED
60#define uLong64 vsi_l_offset
70#ifndef CPL_MINIZIP_IOAPI_H_INCLUDED
71#include "cpl_minizip_ioapi.h"
79#if defined(STRICTUNZIP) || defined(STRICTZIPUNZIP)
82typedef struct TagunzFile__ {
int unused; } unzFile__;
83typedef unzFile__ *unzFile;
89#define UNZ_END_OF_LIST_OF_FILE (-100)
90#define UNZ_ERRNO (Z_ERRNO)
92#define UNZ_PARAMERROR (-102)
93#define UNZ_BADZIPFILE (-103)
94#define UNZ_INTERNALERROR (-104)
95#define UNZ_CRCERROR (-105)
98typedef struct tm_unz_s
110typedef struct unz_global_info_s
112 uLong64 number_entry;
118typedef struct unz_file_info_s
121 uLong version_needed;
123 uLong compression_method;
126 uLong64 compressed_size;
127 uLong64 uncompressed_size;
129 uLong size_file_extra;
130 uLong size_file_comment;
132 uLong disk_num_start;
139extern int ZEXPORT cpl_unzStringFileNameCompare (
const char* fileName1,
140 const char* fileName2,
141 int iCaseSensitivity);
151extern unzFile ZEXPORT cpl_unzOpen (
const char *path);
162extern unzFile ZEXPORT cpl_unzOpen2 (
const char *path,
163 zlib_filefunc_def* pzlib_filefunc_def);
169extern int ZEXPORT cpl_unzClose (unzFile file);
176extern int ZEXPORT cpl_unzGetGlobalInfo (unzFile file,
177 unz_global_info *pglobal_info);
183extern int ZEXPORT cpl_unzGetGlobalComment (unzFile file,
195extern int ZEXPORT cpl_unzGoToFirstFile (unzFile file);
201extern int ZEXPORT cpl_unzGoToNextFile (unzFile file);
208extern int ZEXPORT cpl_unzLocateFile (unzFile file,
209 const char *szFileName,
210 int iCaseSensitivity);
223typedef struct unz_file_pos_s
225 uLong64 pos_in_zip_directory;
229extern int ZEXPORT cpl_unzGetFilePos(
231 unz_file_pos* file_pos);
233extern int ZEXPORT cpl_unzGoToFilePos(
235 unz_file_pos* file_pos);
239extern int ZEXPORT cpl_unzGetCurrentFileInfo (unzFile file,
240 unz_file_info *pfile_info,
242 uLong fileNameBufferSize,
244 uLong extraFieldBufferSize,
246 uLong commentBufferSize);
262extern uLong64 ZEXPORT cpl_unzGetCurrentFileZStreamPos (unzFile file);
271extern int ZEXPORT cpl_unzOpenCurrentFile (unzFile file);
277extern int ZEXPORT cpl_unzOpenCurrentFilePassword (unzFile file,
278 const char* password);
285extern int ZEXPORT cpl_unzOpenCurrentFile2 (unzFile file,
298extern int ZEXPORT cpl_unzOpenCurrentFile3 (unzFile file,
302 const char* password);
312extern int ZEXPORT cpl_unzCloseCurrentFile (unzFile file);
318extern int ZEXPORT cpl_unzReadCurrentFile (unzFile file,
332extern z_off_t ZEXPORT cpl_unztell (unzFile file);
337extern int ZEXPORT cpl_unzeof (unzFile file);
342extern int ZEXPORT cpl_unzGetLocalExtrafield (unzFile file,
361extern uLong64 ZEXPORT cpl_unzGetOffset (unzFile file);
364extern int ZEXPORT cpl_unzSetOffset (unzFile file, uLong64 pos);