misc/quazip/zip.h
author sheepluva
Sat, 17 Sep 2011 19:43:45 +0200
branch0.9.16
changeset 5953 57af6f3abf4a
parent 5752 ea95ee97c805
child 7889 57b117d441b9
permissions -rw-r--r--
fix style of lobby chatroom user context menu
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
5752
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     1
/* zip.h -- IO for compress .zip files using zlib
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     2
   Version 1.01e, February 12th, 2005
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     3
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     4
   Copyright (C) 1998-2005 Gilles Vollant
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     5
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     6
   This unzip package allow creates .ZIP file, compatible with PKZip 2.04g
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     7
     WinZip, InfoZip tools and compatible.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     8
   Multi volume ZipFile (span) are not supported.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
     9
   Encryption compatible with pkzip 2.04g only supported
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    10
   Old compressions used by old PKZip 1.x are not supported
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    11
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    12
  For uncompress .zip file, look at unzip.h
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    13
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    14
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    15
   I WAIT FEEDBACK at mail info@winimage.com
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    16
   Visit also http://www.winimage.com/zLibDll/unzip.html for evolution
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    17
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    18
   Condition of use and distribution are the same than zlib :
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    19
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    20
  This software is provided 'as-is', without any express or implied
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    21
  warranty.  In no event will the authors be held liable for any damages
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    22
  arising from the use of this software.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    23
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    24
  Permission is granted to anyone to use this software for any purpose,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    25
  including commercial applications, and to alter it and redistribute it
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    26
  freely, subject to the following restrictions:
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    27
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    28
  1. The origin of this software must not be misrepresented; you must not
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    29
     claim that you wrote the original software. If you use this software
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    30
     in a product, an acknowledgment in the product documentation would be
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    31
     appreciated but is not required.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    32
  2. Altered source versions must be plainly marked as such, and must not be
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    33
     misrepresented as being the original software.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    34
  3. This notice may not be removed or altered from any source distribution.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    35
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    36
   Modified by Sergey A. Tachenov to integrate with Qt.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    37
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    38
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    39
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    40
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    41
/* for more info about .ZIP format, see
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    42
      http://www.info-zip.org/pub/infozip/doc/appnote-981119-iz.zip
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    43
      http://www.info-zip.org/pub/infozip/doc/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    44
   PkWare has also a specification at :
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    45
      ftp://ftp.pkware.com/probdesc.zip
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    46
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    47
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    48
#ifndef _zip_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    49
#define _zip_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    50
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    51
#ifdef __cplusplus
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    52
extern "C" {
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    53
#endif
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    54
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    55
#ifndef _ZLIB_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    56
#include "zlib.h"
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    57
#endif
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    58
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    59
#ifndef _ZLIBIOAPI_H
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    60
#include "ioapi.h"
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    61
#endif
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    62
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    63
#if defined(STRICTZIP) || defined(STRICTZIPUNZIP)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    64
/* like the STRICT of WIN32, we define a pointer that cannot be converted
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    65
    from (void*) without cast */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    66
typedef struct TagzipFile__ { int unused; } zipFile__;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    67
typedef zipFile__ *zipFile;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    68
#else
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    69
typedef voidp zipFile;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    70
#endif
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    71
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    72
#define ZIP_OK                          (0)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    73
#define ZIP_EOF                         (0)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    74
#define ZIP_ERRNO                       (Z_ERRNO)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    75
#define ZIP_PARAMERROR                  (-102)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    76
#define ZIP_BADZIPFILE                  (-103)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    77
#define ZIP_INTERNALERROR               (-104)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    78
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    79
#ifndef DEF_MEM_LEVEL
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    80
#  if MAX_MEM_LEVEL >= 8
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    81
#    define DEF_MEM_LEVEL 8
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    82
#  else
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    83
#    define DEF_MEM_LEVEL  MAX_MEM_LEVEL
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    84
#  endif
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    85
#endif
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    86
/* default memLevel */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    87
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    88
/* tm_zip contain date/time info */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    89
typedef struct tm_zip_s
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    90
{
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    91
    uInt tm_sec;            /* seconds after the minute - [0,59] */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    92
    uInt tm_min;            /* minutes after the hour - [0,59] */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    93
    uInt tm_hour;           /* hours since midnight - [0,23] */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    94
    uInt tm_mday;           /* day of the month - [1,31] */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    95
    uInt tm_mon;            /* months since January - [0,11] */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    96
    uInt tm_year;           /* years - [1980..2044] */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    97
} tm_zip;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    98
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
    99
typedef struct
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   100
{
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   101
    tm_zip      tmz_date;       /* date in understandable format           */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   102
    uLong       dosDate;       /* if dos_date == 0, tmu_date is used      */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   103
/*    uLong       flag;        */   /* general purpose bit flag        2 bytes */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   104
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   105
    uLong       internal_fa;    /* internal file attributes        2 bytes */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   106
    uLong       external_fa;    /* external file attributes        4 bytes */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   107
} zip_fileinfo;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   108
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   109
typedef const char* zipcharpc;
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   110
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   111
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   112
#define APPEND_STATUS_CREATE        (0)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   113
#define APPEND_STATUS_CREATEAFTER   (1)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   114
#define APPEND_STATUS_ADDINZIP      (2)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   115
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   116
extern zipFile ZEXPORT zipOpen OF((voidpf file, int append));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   117
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   118
  Create a zipfile.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   119
     file is whatever the IO API accepts. For Qt IO API it's a pointer to
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   120
       QIODevice. For fopen() IO API it's a file name (const char*).
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   121
     if the file pathname exist and append==APPEND_STATUS_CREATEAFTER, the zip
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   122
       will be created at the end of the file.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   123
         (useful if the file contain a self extractor code)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   124
     if the file pathname exist and append==APPEND_STATUS_ADDINZIP, we will
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   125
       add files in existing zip (be sure you don't add file that doesn't exist)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   126
     If the zipfile cannot be opened, the return value is NULL.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   127
     Else, the return value is a zipFile Handle, usable with other function
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   128
       of this zip package.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   129
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   130
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   131
/* Note : there is no delete function into a zipfile.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   132
   If you want delete file into a zipfile, you must open a zipfile, and create another
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   133
   Of couse, you can use RAW reading and writing to copy the file you did not want delte
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   134
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   135
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   136
extern zipFile ZEXPORT zipOpen2 OF((voidpf file,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   137
                                   int append,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   138
                                   zipcharpc* globalcomment,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   139
                                   zlib_filefunc_def* pzlib_filefunc_def));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   140
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   141
extern int ZEXPORT zipOpenNewFileInZip OF((zipFile file,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   142
                       const char* filename,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   143
                       const zip_fileinfo* zipfi,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   144
                       const void* extrafield_local,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   145
                       uInt size_extrafield_local,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   146
                       const void* extrafield_global,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   147
                       uInt size_extrafield_global,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   148
                       const char* comment,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   149
                       int method,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   150
                       int level));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   151
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   152
  Open a file in the ZIP for writing.
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   153
  filename : the filename in zip (if NULL, '-' without quote will be used
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   154
  *zipfi contain supplemental information
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   155
  if extrafield_local!=NULL and size_extrafield_local>0, extrafield_local
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   156
    contains the extrafield data the the local header
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   157
  if extrafield_global!=NULL and size_extrafield_global>0, extrafield_global
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   158
    contains the extrafield data the the local header
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   159
  if comment != NULL, comment contain the comment string
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   160
  method contain the compression method (0 for store, Z_DEFLATED for deflate)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   161
  level contain the level of compression (can be Z_DEFAULT_COMPRESSION)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   162
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   163
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   164
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   165
extern int ZEXPORT zipOpenNewFileInZip2 OF((zipFile file,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   166
                                            const char* filename,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   167
                                            const zip_fileinfo* zipfi,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   168
                                            const void* extrafield_local,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   169
                                            uInt size_extrafield_local,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   170
                                            const void* extrafield_global,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   171
                                            uInt size_extrafield_global,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   172
                                            const char* comment,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   173
                                            int method,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   174
                                            int level,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   175
                                            int raw));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   176
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   177
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   178
  Same than zipOpenNewFileInZip, except if raw=1, we write raw file
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   179
 */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   180
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   181
extern int ZEXPORT zipOpenNewFileInZip3 OF((zipFile file,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   182
                                            const char* filename,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   183
                                            const zip_fileinfo* zipfi,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   184
                                            const void* extrafield_local,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   185
                                            uInt size_extrafield_local,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   186
                                            const void* extrafield_global,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   187
                                            uInt size_extrafield_global,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   188
                                            const char* comment,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   189
                                            int method,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   190
                                            int level,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   191
                                            int raw,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   192
                                            int windowBits,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   193
                                            int memLevel,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   194
                                            int strategy,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   195
                                            const char* password,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   196
                                            uLong crcForCtypting));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   197
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   198
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   199
  Same than zipOpenNewFileInZip2, except
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   200
    windowBits,memLevel,,strategy : see parameter strategy in deflateInit2
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   201
    password : crypting password (NULL for no crypting)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   202
    crcForCtypting : crc of file to compress (needed for crypting)
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   203
 */
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   204
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   205
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   206
extern int ZEXPORT zipWriteInFileInZip OF((zipFile file,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   207
                       const void* buf,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   208
                       unsigned len));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   209
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   210
  Write data in the zipfile
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   211
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   212
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   213
extern int ZEXPORT zipCloseFileInZip OF((zipFile file));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   214
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   215
  Close the current file in the zipfile
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   216
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   217
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   218
extern int ZEXPORT zipCloseFileInZipRaw OF((zipFile file,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   219
                                            uLong uncompressed_size,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   220
                                            uLong crc32));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   221
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   222
  Close the current file in the zipfile, for fiel opened with
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   223
    parameter raw=1 in zipOpenNewFileInZip2
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   224
  uncompressed_size and crc32 are value for the uncompressed size
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   225
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   226
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   227
extern int ZEXPORT zipClose OF((zipFile file,
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   228
                const char* global_comment));
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   229
/*
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   230
  Close the zipfile
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   231
*/
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   232
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   233
#ifdef __cplusplus
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   234
}
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   235
#endif
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   236
ea95ee97c805 Add QuaZIP library to build system
unc0rr
parents:
diff changeset
   237
#endif /* _zip_H */