60 #ifndef CPL_MINIZIP_ZIP_H_INCLUDED
61 #define CPL_MINIZIP_ZIP_H_INCLUDED
66 #define uLong64 vsi_l_offset
75 #include "cpl_zlib_header.h"
78 #ifndef CPL_MINIZIP_IOAPI_H_INCLUDED
79 #include "cpl_minizip_ioapi.h"
88 #if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
91 typedef struct TagzipFile__
95 typedef zipFile__ *zipFile;
97 typedef voidp zipFile;
102 #define ZIP_ERRNO (Z_ERRNO)
103 #define ZIP_PARAMERROR (-102)
104 #define ZIP_BADZIPFILE (-103)
105 #define ZIP_INTERNALERROR (-104)
107 #ifndef DEF_MEM_LEVEL
108 #if MAX_MEM_LEVEL >= 8
109 #define DEF_MEM_LEVEL 8
111 #define DEF_MEM_LEVEL MAX_MEM_LEVEL
117 typedef struct tm_zip_s
138 typedef const char *zipcharpc;
140 #define APPEND_STATUS_CREATE (0)
141 #define APPEND_STATUS_CREATEAFTER (1)
142 #define APPEND_STATUS_ADDINZIP (2)
144 extern zipFile ZEXPORT cpl_zipOpen(
const char *pathname,
int append);
163 extern zipFile ZEXPORT cpl_zipOpen2(
const char *pathname,
int append,
164 zipcharpc *globalcomment,
165 zlib_filefunc_def *pzlib_filefunc_def);
167 extern int ZEXPORT cpl_zipOpenNewFileInZip(
168 zipFile file,
const char *filename,
const zip_fileinfo *zipfi,
169 const void *extrafield_local, uInt size_extrafield_local,
170 const void *extrafield_global, uInt size_extrafield_global,
171 const char *comment,
int method,
int level);
186 extern int ZEXPORT cpl_zipOpenNewFileInZip2(
187 zipFile file,
const char *filename,
const zip_fileinfo *zipfi,
188 const void *extrafield_local, uInt size_extrafield_local,
189 const void *extrafield_global, uInt size_extrafield_global,
190 const char *comment,
int method,
int level,
int raw);
196 extern int ZEXPORT cpl_zipOpenNewFileInZip3(
197 zipFile file,
const char *filename,
const zip_fileinfo *zipfi,
198 const void *extrafield_local, uInt size_extrafield_local,
199 const void *extrafield_global, uInt size_extrafield_global,
200 const char *comment,
int method,
int level,
int raw,
int windowBits,
201 int memLevel,
int strategy,
const char *password, uLong crcForCtypting,
202 bool bZip64,
bool bIncludeInCentralDirectory);
211 extern int ZEXPORT cpl_zipWriteInFileInZip(zipFile file,
const void *buf,
217 extern int ZEXPORT cpl_zipCloseFileInZip(zipFile file);
222 extern int ZEXPORT cpl_zipCloseFileInZipRaw(zipFile file,
223 ZPOS64_T uncompressed_size,
231 extern int ZEXPORT cpl_zipClose(zipFile file,
const char *global_comment);