| 1 | /* zip.h -- Backwards compatible zip interface |
| 2 | part of the minizip-ng project |
| 3 | |
| 4 | Copyright (C) Nathan Moinvaziri |
| 5 | https://github.com/zlib-ng/minizip-ng |
| 6 | Copyright (C) 1998-2010 Gilles Vollant |
| 7 | https://www.winimage.com/zLibDll/minizip.html |
| 8 | |
| 9 | This program is distributed under the terms of the same license as zlib. |
| 10 | See the accompanying LICENSE file for the full text of the license. |
| 11 | */ |
| 12 | |
| 13 | #ifndef _zip64_H |
| 14 | #define _zip64_Hcxx . . $ `compat/zip.h:14:9`! |
| 15 | |
| 16 | #ifdef __cplusplus |
| 17 | extern "C" { |
| 18 | #endif |
| 19 | |
| 20 | #include <stdint.h> |
| 21 | |
| 22 | #if !defined(_ZLIB_H) && !defined(ZLIB_H) && !defined(ZLIB_H_) |
| 23 | # if __has_include(<zlib-ng.h>) |
| 24 | # include <zlib-ng.h> |
| 25 | # elif __has_include(<zlib.h>) |
| 26 | # include <zlib.h> |
| 27 | # endif |
| 28 | #endif |
| 29 | |
| 30 | #ifndef _ZLIBIOAPI_H |
| 31 | # include "ioapi.h"cxx . . $ `<file>/compat/ioapi.h`/ |
| 32 | #endif |
| 33 | |
| 34 | /***************************************************************************/ |
| 35 | |
| 36 | #if defined(STRICTZIP) || defined(STRICTZIPUNZIP) |
| 37 | /* like the STRICT of WIN32, we define a pointer that cannot be converted |
| 38 | from (void*) without cast */ |
| 39 | typedef struct TagzipFile__ { |
| 40 | int unused; |
| 41 | } zipFile__; |
| 42 | typedef zipFile__ *zipFile; |
| 43 | #else |
| 44 | typedef void *zipFilecxx . . $ zipFile#; |
| 45 | #endif |
| 46 | |
| 47 | /***************************************************************************/ |
| 48 | |
| 49 | #define ZIP_OKcxx . . $ `compat/zip.h:49:9`! (0) |
| 50 | #define ZIP_EOFcxx . . $ `compat/zip.h:50:9`! (0) |
| 51 | #define ZIP_ERRNOcxx . . $ `compat/zip.h:51:9`! (-1) /* Z_ERRNO */ |
| 52 | #define ZIP_PARAMERRORcxx . . $ `compat/zip.h:52:9`! (-102) |
| 53 | #define ZIP_BADZIPFILEcxx . . $ `compat/zip.h:53:9`! (-103) |
| 54 | #define ZIP_INTERNALERRORcxx . . $ `compat/zip.h:54:9`! (-104) |
| 55 | |
| 56 | /***************************************************************************/ |
| 57 | /* default memLevel */ |
| 58 | #ifndef DEF_MEM_LEVEL |
| 59 | # if MAX_MEM_LEVELcxx . . $ `<external>/116306602880328527/zconf.h:277:13`! >= 8 |
| 60 | # define DEF_MEM_LEVELcxx . . $ `compat/zip.h:60:13`! 8 |
| 61 | # else |
| 62 | # define DEF_MEM_LEVEL MAX_MEM_LEVEL |
| 63 | # endif |
| 64 | #endif |
| 65 | |
| 66 | /***************************************************************************/ |
| 67 | /* tm_zip contain date/time info */ |
| 68 | typedef struct tm_zip_scxx . . $ tm_zip_s# { |
| 69 | int tm_seccxx . . $ tm_zip_s#tm_sec.; /* seconds after the minute - [0,59] */ |
| 70 | int tm_mincxx . . $ tm_zip_s#tm_min.; /* minutes after the hour - [0,59] */ |
| 71 | int tm_hourcxx . . $ tm_zip_s#tm_hour.; /* hours since midnight - [0,23] */ |
| 72 | int tm_mdaycxx . . $ tm_zip_s#tm_mday.; /* day of the month - [1,31] */ |
| 73 | int tm_moncxx . . $ tm_zip_s#tm_mon.; /* months since January - [0,11] */ |
| 74 | int tm_yearcxx . . $ tm_zip_s#tm_year.; /* years - [1980..2044] */ |
| 75 | } tm_zipcxx . . $ tm_zip#; |
| 76 | |
| 77 | /***************************************************************************/ |
| 78 | |
| 79 | #if !defined(MZ_COMPAT_VERSION) || MZ_COMPAT_VERSION <= 110 |
| 80 | # define mz_dos_datecxx . . $ `compat/zip.h:80:11`! dosDate |
| 81 | #else |
| 82 | # define mz_dos_date dos_date |
| 83 | #endif |
| 84 | |
| 85 | typedef structcxx . . $ $anonymous_type_ea0a60d7a3367c8a_0# { |
| 86 | tm_zipcxx . . $ tm_zip# tmz_datecxx . . $ $anonymous_type_ea0a60d7a3367c8a_0#tmz_date.; /* date in understandable format */ |
| 87 | unsigned long mz_dos_datecxx . . $ `compat/zip.h:80:11`!; /* if dos_date == 0, tmz_date is used */ |
| 88 | unsigned long internal_facxx . . $ $anonymous_type_ea0a60d7a3367c8a_0#internal_fa.; /* internal file attributes 2 bytes */ |
| 89 | unsigned long external_facxx . . $ $anonymous_type_ea0a60d7a3367c8a_0#external_fa.; /* external file attributes 4 bytes */ |
| 90 | } zip_fileinfocxx . . $ zip_fileinfo#; |
| 91 | |
| 92 | typedef const char *zipcharpccxx . . $ zipcharpc#; |
| 93 | |
| 94 | #define APPEND_STATUS_CREATEcxx . . $ `compat/zip.h:94:9`! (0) |
| 95 | #define APPEND_STATUS_CREATEAFTERcxx . . $ `compat/zip.h:95:9`! (1) |
| 96 | #define APPEND_STATUS_ADDINZIPcxx . . $ `compat/zip.h:96:9`! (2) |
| 97 | |
| 98 | /***************************************************************************/ |
| 99 | /* Writing a zip file */ |
| 100 | |
| 101 | /* Compatibility layer with the original minizip library (zip.h). */ |
| 102 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! zipFilecxx . . $ zipFile# zipOpencxx . . $ zipOpen(fb9ec0bb113f3da8).(const char *path, int append); |
| 103 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! zipFilecxx . . $ zipFile# zipOpen64cxx . . $ zipOpen64(9e54ad7ae2b3e1ba).(const void *path, int append); |
| 104 | |
| 105 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! zipFilecxx . . $ zipFile# zipOpen2cxx . . $ zipOpen2(8ffb402732c6b63f).(const char *path, int append, zipcharpccxx . . $ zipcharpc# *globalcomment, zlib_filefunc_defcxx . . $ zlib_filefunc_def# *pzlib_filefunc_def); |
| 106 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! zipFilecxx . . $ zipFile# zipOpen2_64cxx . . $ zipOpen2_64(72f84b7f97b125d9).(const void *path, int append, zipcharpccxx . . $ zipcharpc# *globalcomment, |
| 107 | zlib_filefunc64_defcxx . . $ zlib_filefunc64_def# *pzlib_filefunc_def); |
| 108 | /* zipOpen3 is not supported */ |
| 109 | |
| 110 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZipcxx . . $ zipOpenNewFileInZip(7ef2ad9b3db8144).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 111 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 112 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 113 | int compression_method, int level); |
| 114 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip64cxx . . $ zipOpenNewFileInZip64(4e6789aa9dccef91).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 115 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 116 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 117 | int compression_method, int level, int zip64); |
| 118 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip2cxx . . $ zipOpenNewFileInZip2(4e6789aa9dccef91).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 119 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 120 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 121 | int compression_method, int level, int raw); |
| 122 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip2_64cxx . . $ zipOpenNewFileInZip2_64(42bd67f73cb48adc).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 123 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 124 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 125 | int compression_method, int level, int raw, int zip64); |
| 126 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip3cxx . . $ zipOpenNewFileInZip3(ceaa5c8479839d6f).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 127 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 128 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 129 | int compression_method, int level, int raw, int windowBits, int memLevel, int strategy, |
| 130 | const char *password, unsigned long crc_for_crypting); |
| 131 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip3_64cxx . . $ zipOpenNewFileInZip3_64(37ff6970dcefa137).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 132 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 133 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 134 | int compression_method, int level, int raw, int windowBits, int memLevel, |
| 135 | int strategy, const char *password, unsigned long crc_for_crypting, int zip64); |
| 136 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip4cxx . . $ zipOpenNewFileInZip4(2f19661c10ce5227).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 137 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 138 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 139 | int compression_method, int level, int raw, int windowBits, int memLevel, int strategy, |
| 140 | const char *password, unsigned long crc_for_crypting, unsigned long version_madeby, |
| 141 | unsigned long flag_base); |
| 142 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip4_64cxx . . $ zipOpenNewFileInZip4_64(e5e9e32606423d18).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 143 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 144 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 145 | int compression_method, int level, int raw, int windowBits, int memLevel, |
| 146 | int strategy, const char *password, unsigned long crc_for_crypting, |
| 147 | unsigned long version_madeby, unsigned long flag_base, int zip64); |
| 148 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipWriteInFileInZipcxx . . $ zipWriteInFileInZip(45733b120b1d036c).(zipFilecxx . . $ zipFile# file, const void *buf, uint32_tcxx . . $ uint32_t# len); |
| 149 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipCloseFileInZipRawcxx . . $ zipCloseFileInZipRaw(9a5c82343a5ae9bc).(zipFilecxx . . $ zipFile# file, unsigned long uncompressed_size, unsigned long crc32); |
| 150 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipCloseFileInZipRaw64cxx . . $ zipCloseFileInZipRaw64(9a5c82343a5ae9bc).(zipFilecxx . . $ zipFile# file, uint64_tcxx . . $ uint64_t# uncompressed_size, unsigned long crc32); |
| 151 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipCloseFileInZipcxx . . $ zipCloseFileInZip(dedf1e9b1c614a07).(zipFilecxx . . $ zipFile# file); |
| 152 | /* zipAlreadyThere is too new */ |
| 153 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipClosecxx . . $ zipClose(f53b6be6549e6d95).(zipFilecxx . . $ zipFile# file, const char *global_comment); |
| 154 | /* zipRemoveExtraInfoBlock is not supported */ |
| 155 | |
| 156 | /* Compatibility layer with older minizip-ng (mz_zip.h). */ |
| 157 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! zipFilecxx . . $ zipFile# zipOpen_MZcxx . . $ zipOpen_MZ(d0e8f2556fab45).(void *stream, int append, zipcharpccxx . . $ zipcharpc# *globalcomment); |
| 158 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! void *zipGetHandle_MZcxx . . $ zipGetHandle_MZ(9f162e79bfc6c74).(zipFilecxx . . $ zipFile#); |
| 159 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! void *zipGetStream_MZcxx . . $ zipGetStream_MZ(9f162e79bfc6c74).(zipFilecxx . . $ zipFile# file); |
| 160 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip_64cxx . . $ zipOpenNewFileInZip_64(4e6789aa9dccef91).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 161 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 162 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 163 | int compression_method, int level, int zip64); |
| 164 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipOpenNewFileInZip5cxx . . $ zipOpenNewFileInZip5(e5e9e32606423d18).(zipFilecxx . . $ zipFile# file, const char *filename, const zip_fileinfocxx . . $ zip_fileinfo# *zipfi, |
| 165 | const void *extrafield_local, uint16_tcxx . . $ uint16_t# size_extrafield_local, |
| 166 | const void *extrafield_global, uint16_tcxx . . $ uint16_t# size_extrafield_global, const char *comment, |
| 167 | int compression_method, int level, int raw, int windowBits, int memLevel, int strategy, |
| 168 | const char *password, unsigned long crc_for_crypting, unsigned long version_madeby, |
| 169 | unsigned long flag_base, int zip64); |
| 170 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipCloseFileInZip64cxx . . $ zipCloseFileInZip64(dedf1e9b1c614a07).(zipFilecxx . . $ zipFile# file); |
| 171 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipClose_64cxx . . $ zipClose_64(f53b6be6549e6d95).(zipFilecxx . . $ zipFile# file, const char *global_comment); |
| 172 | ZEXPORTcxx . . $ `<external>/116306602880328527/zconf.h:392:11`! int zipClose2_64cxx . . $ zipClose2_64(3f12c0a817aecbd3).(zipFilecxx . . $ zipFile# file, const char *global_comment, uint16_tcxx . . $ uint16_t# version_madeby); |
| 173 | int zipClose_MZcxx . . $ zipClose_MZ(f53b6be6549e6d95).(zipFilecxx . . $ zipFile# file, const char *global_comment); |
| 174 | int zipClose2_MZcxx . . $ zipClose2_MZ(3f12c0a817aecbd3).(zipFilecxx . . $ zipFile# file, const char *global_comment, uint16_tcxx . . $ uint16_t# version_madeby); |
| 175 | |
| 176 | #ifdef __cplusplus |
| 177 | } |
| 178 | #endif |
| 179 | |
| 180 | #endif /* _zip64_H */ |