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;
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;
133 uLong size_file_extra;
134 uLong size_file_comment;
136 uLong disk_num_start;
143 extern int ZEXPORT cpl_unzStringFileNameCompare(
const char *fileName1,
144 const char *fileName2,
145 int iCaseSensitivity);
155 extern unzFile ZEXPORT cpl_unzOpen(
const char *path);
166 extern unzFile ZEXPORT cpl_unzOpen2(
const char *path,
167 zlib_filefunc_def *pzlib_filefunc_def);
173 extern int ZEXPORT cpl_unzClose(unzFile file);
180 extern int ZEXPORT cpl_unzGetGlobalInfo(unzFile file,
181 unz_global_info *pglobal_info);
187 extern int ZEXPORT cpl_unzGetGlobalComment(unzFile file,
char *szComment,
198 extern int ZEXPORT cpl_unzGoToFirstFile(unzFile file);
204 extern int ZEXPORT cpl_unzGoToNextFile(unzFile file);
211 extern int ZEXPORT cpl_unzLocateFile(unzFile file,
const char *szFileName,
212 int iCaseSensitivity);
225 typedef struct unz_file_pos_s
227 uLong64 pos_in_zip_directory;
231 extern int ZEXPORT cpl_unzGetFilePos(unzFile file, unz_file_pos *file_pos);
233 extern int ZEXPORT cpl_unzGoToFilePos(unzFile file, unz_file_pos *file_pos);
237 extern int ZEXPORT cpl_unzGetCurrentFileInfo(
238 unzFile file, unz_file_info *pfile_info,
char *szFileName,
239 uLong fileNameBufferSize,
void *extraField, uLong extraFieldBufferSize,
240 char *szComment, uLong commentBufferSize);
255 extern uLong64 ZEXPORT cpl_unzGetCurrentFileZStreamPos(unzFile file);
264 extern int ZEXPORT cpl_unzOpenCurrentFile(unzFile file);
270 extern int ZEXPORT cpl_unzOpenCurrentFilePassword(unzFile file,
271 const char *password);
278 extern int ZEXPORT cpl_unzOpenCurrentFile2(unzFile file,
int *method,
279 int *level,
int raw);
288 extern int ZEXPORT cpl_unzOpenCurrentFile3(unzFile file,
int *method,
290 const char *password);
299 extern int ZEXPORT cpl_unzCloseCurrentFile(unzFile file);
305 extern int ZEXPORT cpl_unzReadCurrentFile(unzFile file, voidp buf,
318 extern z_off_t ZEXPORT cpl_unztell(unzFile file);
323 extern int ZEXPORT cpl_unzeof(unzFile file);
328 extern int ZEXPORT cpl_unzGetLocalExtrafield(unzFile file, voidp buf,
346 extern uLong64 ZEXPORT cpl_unzGetOffset(unzFile file);
349 extern int ZEXPORT cpl_unzSetOffset(unzFile file, uLong64 pos);