ckb-next
v0.2.8 at branch master
ckb-next driver for corsair devices
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include "zlib.h"
#include "zip.h"
#include <errno.h>
#include "crypt.h"
Go to the source code of this file.
Data Structures | |
struct | linkedlist_datablock_internal_s |
struct | linkedlist_data_s |
struct | curfile64_info |
struct | zip64_internal |
Macros | |
#define | local static |
#define | VERSIONMADEBY (0x031e) /* best for standard pkware crypt */ |
#define | Z_BUFSIZE (64*1024) /* (16384) */ |
#define | Z_MAXFILENAMEINZIP (256) |
#define | ALLOC(size) (malloc(size)) |
#define | TRYFREE(p) {if (p) free(p);} |
#define | MAKEULONG64(a, b) ((ZPOS64_T)(((unsigned long)(a)) | ((ZPOS64_T)((unsigned long)(b))) << 32)) |
#define | SEEK_CUR 1 |
#define | SEEK_END 2 |
#define | SEEK_SET 0 |
#define | SIZEDATA_INDATABLOCK (4096-(4*4)) |
#define | LOCALHEADERMAGIC (0x04034b50) |
#define | DESCRIPTORHEADERMAGIC (0x08074b50) |
#define | CENTRALHEADERMAGIC (0x02014b50) |
#define | ENDHEADERMAGIC (0x06054b50) |
#define | ZIP64ENDHEADERMAGIC (0x6064b50) |
#define | ZIP64ENDLOCHEADERMAGIC (0x7064b50) |
#define | FLAG_LOCALHEADER_OFFSET (0x06) |
#define | CRC_LOCALHEADER_OFFSET (0x0e) |
#define | SIZECENTRALHEADER (0x2e) /* 46 */ |
#define | INCLUDECRYPTINGCODE_IFCRYPTALLOWED |
#define | BUFREADCOMMENT (0x400) |
Typedefs | |
typedef uLongf | z_crc_t |
typedef struct linkedlist_datablock_internal_s | linkedlist_datablock_internal |
typedef struct linkedlist_data_s | linkedlist_data |
Functions | |
static linkedlist_datablock_internal * | allocate_new_datablock () |
static void | free_datablock (linkedlist_datablock_internal *ldi) |
static void | init_linkedlist (linkedlist_data *ll) |
static void | free_linkedlist (linkedlist_data *ll) |
static int | add_data_in_datablock (linkedlist_data *ll, const void *buf, uLong len) |
static int zip64local_putValue | _Z_OF ((const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte)) |
static int | zip64local_putValue (const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, ZPOS64_T x, int nbByte) |
static void zip64local_putValue_inmemory | _Z_OF ((void *dest, ZPOS64_T x, int nbByte)) |
static void | zip64local_putValue_inmemory (void *dest, ZPOS64_T x, int nbByte) |
static uLong | zip64local_TmzDateToDosDate (const tm_zip *ptm) |
static int zip64local_getByte | _Z_OF ((const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, int *pi)) |
static int | zip64local_getByte (const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, int *pi) |
static int zip64local_getShort | _Z_OF ((const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, uLong *pX)) |
static int | zip64local_getShort (const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, uLong *pX) |
static int | zip64local_getLong (const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, uLong *pX) |
static int zip64local_getLong64 | _Z_OF ((const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX)) |
static int | zip64local_getLong64 (const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream, ZPOS64_T *pX) |
static ZPOS64_T zip64local_SearchCentralDir | _Z_OF ((const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream)) |
static ZPOS64_T | zip64local_SearchCentralDir (const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream) |
static ZPOS64_T | zip64local_SearchCentralDir64 (const zlib_filefunc64_32_def *pzlib_filefunc_def, voidpf filestream) |
int | LoadCentralDirectoryRecord (zip64_internal *pziinit) |
zipFile ZEXPORT | zipOpen3 (voidpf file, int append, zipcharpc *globalcomment, zlib_filefunc64_32_def *pzlib_filefunc64_32_def, unsigned flags) |
zipFile ZEXPORT | zipOpen2 (voidpf file, int append, zipcharpc *globalcomment, zlib_filefunc_def *pzlib_filefunc32_def) |
zipFile ZEXPORT | zipOpen2_64 (voidpf file, int append, zipcharpc *globalcomment, zlib_filefunc64_def *pzlib_filefunc_def) |
zipFile ZEXPORT | zipOpen (voidpf file, int append) |
zipFile ZEXPORT | zipOpen64 (voidpf file, int append) |
int | Write_LocalFileHeader (zip64_internal *zi, const char *filename, uInt size_extrafield_local, const void *extrafield_local, uLong version_to_extract) |
int ZEXPORT | zipOpenNewFileInZip4_64 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char *password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase, int zip64) |
int ZEXPORT | zipOpenNewFileInZip4 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char *password, uLong crcForCrypting, uLong versionMadeBy, uLong flagBase) |
int ZEXPORT | zipOpenNewFileInZip3 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char *password, uLong crcForCrypting) |
int ZEXPORT | zipOpenNewFileInZip3_64 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw, int windowBits, int memLevel, int strategy, const char *password, uLong crcForCrypting, int zip64) |
int ZEXPORT | zipOpenNewFileInZip2 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw) |
int ZEXPORT | zipOpenNewFileInZip2_64 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int raw, int zip64) |
int ZEXPORT | zipOpenNewFileInZip64 (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level, int zip64) |
int ZEXPORT | zipOpenNewFileInZip (zipFile file, const char *filename, const zip_fileinfo *zipfi, const void *extrafield_local, uInt size_extrafield_local, const void *extrafield_global, uInt size_extrafield_global, const char *comment, int method, int level) |
static int | zip64FlushWriteBuffer (zip64_internal *zi) |
int ZEXPORT | zipWriteInFileInZip (zipFile file, const void *buf, unsigned int len) |
int ZEXPORT | zipCloseFileInZipRaw (zipFile file, uLong uncompressed_size, uLong crc32) |
int ZEXPORT | zipCloseFileInZipRaw64 (zipFile file, ZPOS64_T uncompressed_size, uLong crc32) |
int ZEXPORT | zipCloseFileInZip (zipFile file) |
int | Write_Zip64EndOfCentralDirectoryLocator (zip64_internal *zi, ZPOS64_T zip64eocd_pos_inzip) |
int | Write_Zip64EndOfCentralDirectoryRecord (zip64_internal *zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) |
int | Write_EndOfCentralDirectoryRecord (zip64_internal *zi, uLong size_centraldir, ZPOS64_T centraldir_pos_inzip) |
int | Write_GlobalComment (zip64_internal *zi, const char *global_comment) |
int ZEXPORT | zipClose (zipFile file, const char *global_comment) |
int ZEXPORT | zipRemoveExtraInfoBlock (char *pData, int *dataLen, short sHeader) |
int ZEXPORT | zipSetFlags (zipFile file, unsigned flags) |
int ZEXPORT | zipClearFlags (zipFile file, unsigned flags) |
Variables | |
const char | zip_copyright [] =" zip 1.01 Copyright 1998-2004 Gilles Vollant - http://www.winimage.com/zLibDll" |
struct linkedlist_datablock_internal_s |
Data Fields | ||
---|---|---|
uLong | avail_in_this_block | |
unsigned char | data[(4096-(4 *4))] | |
uLong | filled_in_this_block | |
struct linkedlist_datablock_internal_s * |
next_datablock | |
uLong | unused |
struct linkedlist_data_s |
Data Fields | ||
---|---|---|
linkedlist_datablock_internal * | first_block | |
linkedlist_datablock_internal * | last_block |
struct curfile64_info |
Data Fields | ||
---|---|---|
Byte | buffered_data[(64 *1024)] | |
char * | central_header | |
uLong | crc32 | |
int | crypt_header_size | |
uLong | dosDate | |
int | encrypt | |
uLong | flag | |
unsigned long | keys[3] | |
int | method | |
const z_crc_t FAR * | pcrc_32_tab | |
uInt | pos_in_buffered_data | |
ZPOS64_T | pos_local_header | |
ZPOS64_T | pos_zip64extrainfo | |
int | raw | |
uLong | size_centralExtra | |
uLong | size_centralExtraFree | |
uLong | size_centralheader | |
z_stream | stream | |
int | stream_initialised | |
ZPOS64_T | totalCompressedData | |
ZPOS64_T | totalUncompressedData | |
int | zip64 |
struct zip64_internal |
Data Fields | ||
---|---|---|
ZPOS64_T | add_position_when_writting_offset | |
ZPOS64_T | begin_pos | |
linkedlist_data | central_dir | |
curfile64_info | ci | |
voidpf | filestream | |
unsigned | flags | |
char * | globalcomment | |
int | in_opened_file_inzip | |
ZPOS64_T | number_entry | |
zlib_filefunc64_32_def | z_filefunc |
#define ALLOC | ( | size | ) | (malloc(size)) |
Definition at line 68 of file zip.c.
Referenced by allocate_new_datablock(), LoadCentralDirectoryRecord(), zip64local_SearchCentralDir(), zip64local_SearchCentralDir64(), zipOpen3(), zipOpenNewFileInZip4_64(), and zipRemoveExtraInfoBlock().
#define BUFREADCOMMENT (0x400) |
Definition at line 481 of file zip.c.
Referenced by zip64local_SearchCentralDir(), and zip64local_SearchCentralDir64().
#define CENTRALHEADERMAGIC (0x02014b50) |
Definition at line 111 of file zip.c.
Referenced by zipOpenNewFileInZip4_64().
#define DESCRIPTORHEADERMAGIC (0x08074b50) |
Definition at line 110 of file zip.c.
Referenced by zipCloseFileInZipRaw64().
#define ENDHEADERMAGIC (0x06054b50) |
Definition at line 112 of file zip.c.
Referenced by Write_EndOfCentralDirectoryRecord().
#define LOCALHEADERMAGIC (0x04034b50) |
Definition at line 109 of file zip.c.
Referenced by Write_LocalFileHeader().
#define SEEK_END 2 |
Definition at line 90 of file zip.c.
Referenced by zipOpen3().
#define SIZECENTRALHEADER (0x2e) /* 46 */ |
Definition at line 119 of file zip.c.
Referenced by zipOpenNewFileInZip4_64().
#define SIZEDATA_INDATABLOCK (4096-(4*4)) |
Definition at line 107 of file zip.c.
Referenced by allocate_new_datablock(), and LoadCentralDirectoryRecord().
#define TRYFREE | ( | p | ) | {if (p) free(p);} |
Definition at line 71 of file zip.c.
Referenced by free_datablock(), LoadCentralDirectoryRecord(), zip64local_SearchCentralDir(), zip64local_SearchCentralDir64(), zipClose(), zipOpen3(), and zipRemoveExtraInfoBlock().
#define VERSIONMADEBY (0x031e) /* best for standard pkware crypt */ |
Definition at line 56 of file zip.c.
Referenced by zipOpenNewFileInZip(), zipOpenNewFileInZip2(), zipOpenNewFileInZip2_64(), zipOpenNewFileInZip3(), zipOpenNewFileInZip3_64(), and zipOpenNewFileInZip64().
#define Z_BUFSIZE (64*1024) /* (16384) */ |
Definition at line 60 of file zip.c.
Referenced by zipCloseFileInZipRaw64(), zipOpenNewFileInZip4_64(), and zipWriteInFileInZip().
#define ZIP64ENDHEADERMAGIC (0x6064b50) |
Definition at line 113 of file zip.c.
Referenced by Write_Zip64EndOfCentralDirectoryRecord().
#define ZIP64ENDLOCHEADERMAGIC (0x7064b50) |
Definition at line 114 of file zip.c.
Referenced by Write_Zip64EndOfCentralDirectoryLocator().
typedef struct linkedlist_data_s linkedlist_data |
typedef struct linkedlist_datablock_internal_s linkedlist_datablock_internal |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
Definition at line 234 of file zip.c.
References allocate_new_datablock(), linkedlist_datablock_internal_s::avail_in_this_block, linkedlist_datablock_internal_s::data, linkedlist_datablock_internal_s::filled_in_this_block, linkedlist_data_s::first_block, linkedlist_data_s::last_block, linkedlist_datablock_internal_s::next_datablock, ZIP_INTERNALERROR, and ZIP_OK.
Referenced by LoadCentralDirectoryRecord(), and zipCloseFileInZipRaw64().
|
static |
Definition at line 198 of file zip.c.
References ALLOC, linkedlist_datablock_internal_s::avail_in_this_block, linkedlist_datablock_internal_s::filled_in_this_block, linkedlist_datablock_internal_s::next_datablock, and SIZEDATA_INDATABLOCK.
Referenced by add_data_in_datablock().
|
static |
Definition at line 212 of file zip.c.
References linkedlist_datablock_internal_s::next_datablock, and TRYFREE.
Referenced by free_linkedlist().
|
static |
Definition at line 227 of file zip.c.
References linkedlist_data_s::first_block, free_datablock(), and linkedlist_data_s::last_block.
Referenced by zipClose().
|
static |
Definition at line 222 of file zip.c.
References linkedlist_data_s::first_block, and linkedlist_data_s::last_block.
Referenced by zipOpen3().
int LoadCentralDirectoryRecord | ( | zip64_internal * | pziinit | ) |
Definition at line 649 of file zip.c.
References add_data_in_datablock(), zip64_internal::add_position_when_writting_offset, ALLOC, zip64_internal::begin_pos, zip64_internal::central_dir, zip64_internal::filestream, zip64_internal::flags, zip64_internal::globalcomment, zip64_internal::number_entry, SIZEDATA_INDATABLOCK, TRYFREE, zip64_internal::z_filefunc, ZCLOSE64, ZFAKECLOSE64, zip64local_getLong(), zip64local_getLong64(), zip64local_getShort(), zip64local_SearchCentralDir(), zip64local_SearchCentralDir64(), ZIP_AUTO_CLOSE, ZIP_BADZIPFILE, ZIP_ERRNO, ZIP_OK, ZLIB_FILEFUNC_SEEK_SET, ZREAD64, and ZSEEK64.
Referenced by zipOpen3().
int Write_EndOfCentralDirectoryRecord | ( | zip64_internal * | zi, |
uLong | size_centraldir, | ||
ZPOS64_T | centraldir_pos_inzip | ||
) |
Definition at line 1876 of file zip.c.
References zip64_internal::add_position_when_writting_offset, ENDHEADERMAGIC, zip64_internal::filestream, zip64_internal::number_entry, zip64_internal::z_filefunc, zip64local_putValue(), and ZIP_OK.
Referenced by zipClose().
int Write_GlobalComment | ( | zip64_internal * | zi, |
const char * | global_comment | ||
) |
Definition at line 1924 of file zip.c.
References zip64_internal::filestream, zip64_internal::z_filefunc, zip64local_putValue(), ZIP_ERRNO, ZIP_OK, and ZWRITE64.
Referenced by zipClose().
int Write_LocalFileHeader | ( | zip64_internal * | zi, |
const char * | filename, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_local, | ||
uLong | version_to_extract | ||
) |
Definition at line 977 of file zip.c.
References zip64_internal::ci, curfile64_info::dosDate, zip64_internal::filestream, curfile64_info::flag, LOCALHEADERMAGIC, curfile64_info::method, curfile64_info::pos_zip64extrainfo, zip64_internal::z_filefunc, curfile64_info::zip64, zip64local_putValue(), ZIP_ERRNO, ZIP_OK, ZTELL64, and ZWRITE64.
Referenced by zipOpenNewFileInZip4_64().
int Write_Zip64EndOfCentralDirectoryLocator | ( | zip64_internal * | zi, |
ZPOS64_T | zip64eocd_pos_inzip | ||
) |
Definition at line 1815 of file zip.c.
References zip64_internal::add_position_when_writting_offset, zip64_internal::filestream, zip64_internal::z_filefunc, ZIP64ENDLOCHEADERMAGIC, zip64local_putValue(), and ZIP_OK.
Referenced by zipClose().
int Write_Zip64EndOfCentralDirectoryRecord | ( | zip64_internal * | zi, |
uLong | size_centraldir, | ||
ZPOS64_T | centraldir_pos_inzip | ||
) |
Definition at line 1837 of file zip.c.
References zip64_internal::add_position_when_writting_offset, zip64_internal::filestream, zip64_internal::number_entry, zip64_internal::z_filefunc, ZIP64ENDHEADERMAGIC, zip64local_putValue(), and ZIP_OK.
Referenced by zipClose().
|
static |
Definition at line 1403 of file zip.c.
References curfile64_info::buffered_data, zip64_internal::ci, curfile64_info::encrypt, zip64_internal::filestream, curfile64_info::keys, curfile64_info::method, curfile64_info::pcrc_32_tab, curfile64_info::pos_in_buffered_data, curfile64_info::stream, curfile64_info::totalCompressedData, curfile64_info::totalUncompressedData, Z_BZIP2ED, zip64_internal::z_filefunc, zencode, ZIP_ERRNO, ZIP_OK, and ZWRITE64.
Referenced by zipCloseFileInZipRaw64(), and zipWriteInFileInZip().
|
static |
Definition at line 358 of file zip.c.
References ZERROR64, ZIP_EOF, ZIP_ERRNO, ZIP_OK, and ZREAD64.
Referenced by zip64local_getLong(), zip64local_getLong64(), and zip64local_getShort().
|
static |
Definition at line 404 of file zip.c.
References x, zip64local_getByte(), and ZIP_OK.
Referenced by LoadCentralDirectoryRecord(), and zip64local_SearchCentralDir64().
|
static |
Definition at line 435 of file zip.c.
References x, zip64local_getByte(), and ZIP_OK.
Referenced by LoadCentralDirectoryRecord(), and zip64local_SearchCentralDir64().
|
static |
Definition at line 382 of file zip.c.
References x, zip64local_getByte(), and ZIP_OK.
Referenced by LoadCentralDirectoryRecord().
|
static |
Definition at line 296 of file zip.c.
References ZIP_ERRNO, ZIP_OK, and ZWRITE64.
Referenced by Write_EndOfCentralDirectoryRecord(), Write_GlobalComment(), Write_LocalFileHeader(), Write_Zip64EndOfCentralDirectoryLocator(), Write_Zip64EndOfCentralDirectoryRecord(), and zipCloseFileInZipRaw64().
|
static |
Definition at line 320 of file zip.c.
Referenced by zipCloseFileInZipRaw64(), and zipOpenNewFileInZip4_64().
|
static |
Definition at line 489 of file zip.c.
References ALLOC, BUFREADCOMMENT, TRYFREE, ZLIB_FILEFUNC_SEEK_END, ZLIB_FILEFUNC_SEEK_SET, ZREAD64, ZSEEK64, and ZTELL64.
Referenced by LoadCentralDirectoryRecord().
|
static |
Definition at line 551 of file zip.c.
References ALLOC, BUFREADCOMMENT, TRYFREE, zip64local_getLong(), zip64local_getLong64(), ZIP_OK, ZLIB_FILEFUNC_SEEK_END, ZLIB_FILEFUNC_SEEK_SET, ZREAD64, ZSEEK64, and ZTELL64.
Referenced by LoadCentralDirectoryRecord().
|
static |
Definition at line 341 of file zip.c.
References tm_zip_s::tm_hour, tm_zip_s::tm_mday, tm_zip_s::tm_min, tm_zip_s::tm_mon, tm_zip_s::tm_sec, and tm_zip_s::tm_year.
Referenced by zipOpenNewFileInZip4_64().
int ZEXPORT zipClearFlags | ( | zipFile | file, |
unsigned | flags | ||
) |
Definition at line 2091 of file zip.c.
References zip64_internal::flags, ZIP_OK, ZIP_PARAMERROR, ZIP_SEQUENTIAL, and ZIP_WRITE_DATA_DESCRIPTOR.
Referenced by QuaZipFile::open().
int ZEXPORT zipClose | ( | zipFile | file, |
const char * | global_comment | ||
) |
Definition at line 1942 of file zip.c.
References zip64_internal::add_position_when_writting_offset, zip64_internal::central_dir, linkedlist_datablock_internal_s::data, zip64_internal::filestream, linkedlist_datablock_internal_s::filled_in_this_block, linkedlist_data_s::first_block, zip64_internal::flags, free_linkedlist(), zip64_internal::globalcomment, zip64_internal::in_opened_file_inzip, linkedlist_datablock_internal_s::next_datablock, zip64_internal::number_entry, TRYFREE, Write_EndOfCentralDirectoryRecord(), Write_GlobalComment(), Write_Zip64EndOfCentralDirectoryLocator(), Write_Zip64EndOfCentralDirectoryRecord(), zip64_internal::z_filefunc, ZCLOSE64, ZFAKECLOSE64, ZIP_AUTO_CLOSE, ZIP_ERRNO, ZIP_OK, ZIP_PARAMERROR, zipCloseFileInZip(), ZTELL64, and ZWRITE64.
Referenced by QuaZip::close(), and QuaZip::open().
int ZEXPORT zipCloseFileInZip | ( | zipFile | file | ) |
Definition at line 1810 of file zip.c.
References zipCloseFileInZipRaw().
Referenced by QuaZipFile::close(), zipClose(), and zipOpenNewFileInZip4_64().
int ZEXPORT zipCloseFileInZipRaw | ( | zipFile | file, |
uLong | uncompressed_size, | ||
uLong | crc32 | ||
) |
Definition at line 1549 of file zip.c.
References zipCloseFileInZipRaw64().
Referenced by zipCloseFileInZip().
Definition at line 1554 of file zip.c.
References add_data_in_datablock(), curfile64_info::buffered_data, zip64_internal::central_dir, curfile64_info::central_header, zip64_internal::ci, curfile64_info::crc32, curfile64_info::crypt_header_size, DESCRIPTORHEADERMAGIC, zip64_internal::filestream, curfile64_info::flag, zip64_internal::flags, zip64_internal::in_opened_file_inzip, curfile64_info::method, zip64_internal::number_entry, curfile64_info::pos_in_buffered_data, curfile64_info::pos_local_header, curfile64_info::pos_zip64extrainfo, curfile64_info::raw, curfile64_info::size_centralExtra, curfile64_info::size_centralExtraFree, curfile64_info::size_centralheader, curfile64_info::stream, curfile64_info::stream_initialised, curfile64_info::totalCompressedData, curfile64_info::totalUncompressedData, Z_BUFSIZE, Z_BZIP2ED, zip64_internal::z_filefunc, curfile64_info::zip64, zip64FlushWriteBuffer(), zip64local_putValue(), zip64local_putValue_inmemory(), ZIP_BADZIPFILE, ZIP_ERRNO, ZIP_OK, ZIP_PARAMERROR, ZIP_SEQUENTIAL, ZLIB_FILEFUNC_SEEK_SET, ZSEEK64, and ZTELL64.
Referenced by QuaZipFile::close(), and zipCloseFileInZipRaw().
zipFile ZEXPORT zipOpen | ( | voidpf | file, |
int | append | ||
) |
Definition at line 967 of file zip.c.
References ZIP_DEFAULT_FLAGS, and zipOpen3().
zipFile ZEXPORT zipOpen2 | ( | voidpf | file, |
int | append, | ||
zipcharpc * | globalcomment, | ||
zlib_filefunc_def * | pzlib_filefunc32_def | ||
) |
Definition at line 939 of file zip.c.
References fill_zlib_filefunc64_32_def_from_filefunc32(), ZIP_DEFAULT_FLAGS, and zipOpen3().
Referenced by QuaZip::open().
zipFile ZEXPORT zipOpen2_64 | ( | voidpf | file, |
int | append, | ||
zipcharpc * | globalcomment, | ||
zlib_filefunc64_def * | pzlib_filefunc_def | ||
) |
Definition at line 951 of file zip.c.
References zlib_filefunc64_32_def_s::zfile_func64, ZIP_DEFAULT_FLAGS, zipOpen3(), zlib_filefunc64_32_def_s::zseek32_file, and zlib_filefunc64_32_def_s::ztell32_file.
zipFile ZEXPORT zipOpen3 | ( | voidpf | file, |
int | append, | ||
zipcharpc * | globalcomment, | ||
zlib_filefunc64_32_def * | pzlib_filefunc64_32_def, | ||
unsigned | flags | ||
) |
Definition at line 862 of file zip.c.
References zip64_internal::add_position_when_writting_offset, ALLOC, APPEND_STATUS_ADDINZIP, APPEND_STATUS_CREATE, APPEND_STATUS_CREATEAFTER, zip64_internal::begin_pos, zip64_internal::central_dir, zip64_internal::ci, zip64_internal::filestream, fill_qiodevice64_filefunc(), zip64_internal::flags, zip64_internal::globalcomment, zip64_internal::in_opened_file_inzip, init_linkedlist(), LoadCentralDirectoryRecord(), zip64_internal::number_entry, SEEK_END, curfile64_info::stream_initialised, TRYFREE, zip64_internal::z_filefunc, ZCLOSE64, ZFAKECLOSE64, zlib_filefunc64_32_def_s::zfile_func64, ZIP_AUTO_CLOSE, ZIP_OK, ZLIB_FILEFUNC_MODE_CREATE, ZLIB_FILEFUNC_MODE_EXISTING, ZLIB_FILEFUNC_MODE_READ, ZLIB_FILEFUNC_MODE_WRITE, ZOPEN64, zlib_filefunc64_32_def_s::zseek32_file, ZSEEK64, zlib_filefunc64_32_def_s::ztell32_file, and ZTELL64.
Referenced by QuaZip::open(), zipOpen(), zipOpen2(), zipOpen2_64(), and zipOpen64().
zipFile ZEXPORT zipOpen64 | ( | voidpf | file, |
int | append | ||
) |
Definition at line 972 of file zip.c.
References ZIP_DEFAULT_FLAGS, and zipOpen3().
int ZEXPORT zipOpenNewFileInZip | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level | ||
) |
Definition at line 1390 of file zip.c.
References DEF_MEM_LEVEL, VERSIONMADEBY, and zipOpenNewFileInZip4_64().
int ZEXPORT zipOpenNewFileInZip2 | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level, | ||
int | raw | ||
) |
Definition at line 1351 of file zip.c.
References DEF_MEM_LEVEL, VERSIONMADEBY, and zipOpenNewFileInZip4_64().
int ZEXPORT zipOpenNewFileInZip2_64 | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level, | ||
int | raw, | ||
int | zip64 | ||
) |
Definition at line 1364 of file zip.c.
References DEF_MEM_LEVEL, VERSIONMADEBY, and zipOpenNewFileInZip4_64().
int ZEXPORT zipOpenNewFileInZip3 | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level, | ||
int | raw, | ||
int | windowBits, | ||
int | memLevel, | ||
int | strategy, | ||
const char * | password, | ||
uLong | crcForCrypting | ||
) |
Definition at line 1321 of file zip.c.
References VERSIONMADEBY, and zipOpenNewFileInZip4_64().
int ZEXPORT zipOpenNewFileInZip3_64 | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level, | ||
int | raw, | ||
int | windowBits, | ||
int | memLevel, | ||
int | strategy, | ||
const char * | password, | ||
uLong | crcForCrypting, | ||
int | zip64 | ||
) |
Definition at line 1336 of file zip.c.
References VERSIONMADEBY, and zipOpenNewFileInZip4_64().
Referenced by QuaZipFile::open().
int ZEXPORT zipOpenNewFileInZip4 | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level, | ||
int | raw, | ||
int | windowBits, | ||
int | memLevel, | ||
int | strategy, | ||
const char * | password, | ||
uLong | crcForCrypting, | ||
uLong | versionMadeBy, | ||
uLong | flagBase | ||
) |
Definition at line 1305 of file zip.c.
References zipOpenNewFileInZip4_64().
int ZEXPORT zipOpenNewFileInZip4_64 | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level, | ||
int | raw, | ||
int | windowBits, | ||
int | memLevel, | ||
int | strategy, | ||
const char * | password, | ||
uLong | crcForCrypting, | ||
uLong | versionMadeBy, | ||
uLong | flagBase, | ||
int | zip64 | ||
) |
Definition at line 1077 of file zip.c.
References zip64_internal::add_position_when_writting_offset, ALLOC, curfile64_info::buffered_data, curfile64_info::central_header, CENTRALHEADERMAGIC, zip64_internal::ci, curfile64_info::crc32, curfile64_info::crypt_header_size, zip_fileinfo::dosDate, curfile64_info::dosDate, curfile64_info::encrypt, zip_fileinfo::external_fa, zip64_internal::filestream, curfile64_info::flag, zip64_internal::flags, zip64_internal::in_opened_file_inzip, zip_fileinfo::internal_fa, curfile64_info::keys, curfile64_info::method, curfile64_info::pcrc_32_tab, curfile64_info::pos_in_buffered_data, curfile64_info::pos_local_header, curfile64_info::pos_zip64extrainfo, curfile64_info::raw, curfile64_info::size_centralExtra, curfile64_info::size_centralExtraFree, curfile64_info::size_centralheader, SIZECENTRALHEADER, curfile64_info::stream, curfile64_info::stream_initialised, zip_fileinfo::tmz_date, curfile64_info::totalCompressedData, curfile64_info::totalUncompressedData, Write_LocalFileHeader(), Z_BUFSIZE, Z_BZIP2ED, zip64_internal::z_filefunc, curfile64_info::zip64, zip64local_putValue_inmemory(), zip64local_TmzDateToDosDate(), ZIP_ERRNO, ZIP_INTERNALERROR, ZIP_OK, ZIP_PARAMERROR, ZIP_SEQUENTIAL, ZIP_WRITE_DATA_DESCRIPTOR, zipCloseFileInZip(), ZTELL64, and ZWRITE64.
Referenced by zipOpenNewFileInZip(), zipOpenNewFileInZip2(), zipOpenNewFileInZip2_64(), zipOpenNewFileInZip3(), zipOpenNewFileInZip3_64(), zipOpenNewFileInZip4(), and zipOpenNewFileInZip64().
int ZEXPORT zipOpenNewFileInZip64 | ( | zipFile | file, |
const char * | filename, | ||
const zip_fileinfo * | zipfi, | ||
const void * | extrafield_local, | ||
uInt | size_extrafield_local, | ||
const void * | extrafield_global, | ||
uInt | size_extrafield_global, | ||
const char * | comment, | ||
int | method, | ||
int | level, | ||
int | zip64 | ||
) |
Definition at line 1377 of file zip.c.
References DEF_MEM_LEVEL, VERSIONMADEBY, and zipOpenNewFileInZip4_64().
int ZEXPORT zipRemoveExtraInfoBlock | ( | char * | pData, |
int * | dataLen, | ||
short | sHeader | ||
) |
int ZEXPORT zipSetFlags | ( | zipFile | file, |
unsigned | flags | ||
) |
Definition at line 2077 of file zip.c.
References zip64_internal::flags, ZIP_OK, ZIP_PARAMERROR, ZIP_SEQUENTIAL, and ZIP_WRITE_DATA_DESCRIPTOR.
Referenced by QuaZip::open(), and QuaZipFile::open().
int ZEXPORT zipWriteInFileInZip | ( | zipFile | file, |
const void * | buf, | ||
unsigned int | len | ||
) |
Definition at line 1442 of file zip.c.
References curfile64_info::buffered_data, zip64_internal::ci, curfile64_info::crc32, zip64_internal::in_opened_file_inzip, curfile64_info::method, curfile64_info::pos_in_buffered_data, curfile64_info::raw, curfile64_info::stream, Z_BUFSIZE, Z_BZIP2ED, zip64FlushWriteBuffer(), ZIP_ERRNO, ZIP_OK, and ZIP_PARAMERROR.
Referenced by QuaZipFile::writeData().