ReactOS 0.4.15-dev-5667-ged97270
unzip.h File Reference
#include "zlib.h"
#include "ioapi.h"
Include dependency graph for unzip.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tm_unz_s
 
struct  unz_global_info64_s
 
struct  unz_global_info_s
 
struct  unz_file_info64_s
 
struct  unz_file_info_s
 
struct  unz_file_pos_s
 
struct  unz64_file_pos_s
 

Macros

#define Z_BZIP2ED   12
 
#define UNZ_OK   (0)
 
#define UNZ_END_OF_LIST_OF_FILE   (-100)
 
#define UNZ_ERRNO   (Z_ERRNO)
 
#define UNZ_EOF   (0)
 
#define UNZ_PARAMERROR   (-102)
 
#define UNZ_BADZIPFILE   (-103)
 
#define UNZ_INTERNALERROR   (-104)
 
#define UNZ_CRCERROR   (-105)
 

Typedefs

typedef voidp unzFile
 
typedef struct tm_unz_s tm_unz
 
typedef struct unz_global_info64_s unz_global_info64
 
typedef struct unz_global_info_s unz_global_info
 
typedef struct unz_file_info64_s unz_file_info64
 
typedef struct unz_file_info_s unz_file_info
 
typedef struct unz_file_pos_s unz_file_pos
 
typedef struct unz64_file_pos_s unz64_file_pos
 

Functions

int ZEXPORT unzStringFileNameCompare OF ((const char *fileName1, const char *fileName2, int iCaseSensitivity))
 
unzFile ZEXPORT unzOpen OF ((const char *path))
 
unzFile ZEXPORT unzOpen64 OF ((const void *path))
 
unzFile ZEXPORT unzOpen2 OF ((const char *path, zlib_filefunc_def *pzlib_filefunc_def))
 
unzFile ZEXPORT unzOpen2_64 OF ((const void *path, zlib_filefunc64_def *pzlib_filefunc_def))
 
int ZEXPORT unzClose OF ((unzFile file))
 
int ZEXPORT unzGetGlobalInfo OF ((unzFile file, unz_global_info *pglobal_info))
 
int ZEXPORT unzGetGlobalInfo64 OF ((unzFile file, unz_global_info64 *pglobal_info))
 
int ZEXPORT unzGetGlobalComment OF ((unzFile file, char *szComment, uLong uSizeBuf))
 
int ZEXPORT unzLocateFile OF ((unzFile file, const char *szFileName, int iCaseSensitivity))
 
int ZEXPORT unzGetFilePos (unzFile file, unz_file_pos *file_pos)
 
int ZEXPORT unzGoToFilePos (unzFile file, unz_file_pos *file_pos)
 
int ZEXPORT unzGetFilePos64 (unzFile file, unz64_file_pos *file_pos)
 
int ZEXPORT unzGoToFilePos64 (unzFile file, const unz64_file_pos *file_pos)
 
int ZEXPORT unzGetCurrentFileInfo64 OF ((unzFile file, unz_file_info64 *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize))
 
int ZEXPORT unzGetCurrentFileInfo OF ((unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize))
 
int ZEXPORT unzOpenCurrentFilePassword OF ((unzFile file, const char *password))
 
int ZEXPORT unzOpenCurrentFile2 OF ((unzFile file, int *method, int *level, int raw))
 
int ZEXPORT unzOpenCurrentFile3 OF ((unzFile file, int *method, int *level, int raw, const char *password))
 
int ZEXPORT unzReadCurrentFile OF ((unzFile file, voidp buf, unsigned len))
 
ZPOS64_T ZEXPORT unzGetOffset64 (unzFile file)
 
uLong ZEXPORT unzGetOffset (unzFile file)
 
int ZEXPORT unzSetOffset64 (unzFile file, ZPOS64_T pos)
 
int ZEXPORT unzSetOffset (unzFile file, uLong pos)
 

Macro Definition Documentation

◆ UNZ_BADZIPFILE

#define UNZ_BADZIPFILE   (-103)

Definition at line 79 of file unzip.h.

◆ UNZ_CRCERROR

#define UNZ_CRCERROR   (-105)

Definition at line 81 of file unzip.h.

◆ UNZ_END_OF_LIST_OF_FILE

#define UNZ_END_OF_LIST_OF_FILE   (-100)

Definition at line 75 of file unzip.h.

◆ UNZ_EOF

#define UNZ_EOF   (0)

Definition at line 77 of file unzip.h.

◆ UNZ_ERRNO

#define UNZ_ERRNO   (Z_ERRNO)

Definition at line 76 of file unzip.h.

◆ UNZ_INTERNALERROR

#define UNZ_INTERNALERROR   (-104)

Definition at line 80 of file unzip.h.

◆ UNZ_OK

#define UNZ_OK   (0)

Definition at line 74 of file unzip.h.

◆ UNZ_PARAMERROR

#define UNZ_PARAMERROR   (-102)

Definition at line 78 of file unzip.h.

◆ Z_BZIP2ED

#define Z_BZIP2ED   12

Definition at line 62 of file unzip.h.

Typedef Documentation

◆ tm_unz

◆ unz64_file_pos

◆ unz_file_info

◆ unz_file_info64

◆ unz_file_pos

◆ unz_global_info

◆ unz_global_info64

◆ unzFile

typedef voidp unzFile

Definition at line 70 of file unzip.h.

Function Documentation

◆ OF() [1/16]

int ZEXPORT unzStringFileNameCompare OF ( (const char *fileName1, const char *fileName2, int iCaseSensitivity)  )

◆ OF() [2/16]

◆ OF() [3/16]

unzFile ZEXPORT unzOpen2 OF ( (const char *path, zlib_filefunc_def *pzlib_filefunc_def)  )

◆ OF() [4/16]

◆ OF() [5/16]

unzFile ZEXPORT unzOpen2_64 OF ( (const void *path, zlib_filefunc64_def *pzlib_filefunc_def)  )

◆ OF() [6/16]

Addition for GDAL : START

Addition for GDAL : END

◆ OF() [7/16]

◆ OF() [8/16]

◆ OF() [9/16]

int ZEXPORT unzLocateFile OF ( (unzFile file, const char *szFileName, int iCaseSensitivity)  )

◆ OF() [10/16]

◆ OF() [11/16]

◆ OF() [12/16]

int ZEXPORT unzGetCurrentFileInfo OF ( (unzFile file, unz_file_info *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)  )

◆ OF() [13/16]

int ZEXPORT unzGetCurrentFileInfo64 OF ( (unzFile file, unz_file_info64 *pfile_info, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)  )

◆ OF() [14/16]

◆ OF() [15/16]

◆ OF() [16/16]

◆ unzGetFilePos()

int ZEXPORT unzGetFilePos ( unzFile  file,
unz_file_pos file_pos 
)

Definition at line 1329 of file unzip.c.

1332{
1333 unz64_file_pos file_pos64;
1334 int err = unzGetFilePos64(file,&file_pos64);
1335 if (err==UNZ_OK)
1336 {
1337 file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory;
1338 file_pos->num_of_file = (uLong)file_pos64.num_of_file;
1339 }
1340 return err;
1341}
unsigned long uLong
Definition: zlib.h:39
#define err(...)
Definition: fci.c:127
ZPOS64_T num_of_file
Definition: unzip.h:275
ZPOS64_T pos_in_zip_directory
Definition: unzip.h:274
uLong num_of_file
Definition: unzip.h:261
uLong pos_in_zip_directory
Definition: unzip.h:260
int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
Definition: unzip.c:1313
#define UNZ_OK
Definition: unzip.h:74

◆ unzGetFilePos64()

int ZEXPORT unzGetFilePos64 ( unzFile  file,
unz64_file_pos file_pos 
)

Definition at line 1313 of file unzip.c.

1314{
1315 unz64_s* s;
1316
1317 if (file==NULL || file_pos==NULL)
1318 return UNZ_PARAMERROR;
1319 s=(unz64_s*)file;
1320 if (!s->current_file_ok)
1322
1323 file_pos->pos_in_zip_directory = s->pos_in_central_dir;
1324 file_pos->num_of_file = s->num_file;
1325
1326 return UNZ_OK;
1327}
#define NULL
Definition: types.h:112
GLdouble s
Definition: gl.h:2039
Definition: unzip.c:168
#define UNZ_END_OF_LIST_OF_FILE
Definition: unzip.h:75
#define UNZ_PARAMERROR
Definition: unzip.h:78

Referenced by unzGetFilePos().

◆ unzGetOffset()

uLong ZEXPORT unzGetOffset ( unzFile  file)

Definition at line 2104 of file unzip.c.

2105{
2106 ZPOS64_T offset64;
2107
2108 if (file==NULL)
2109 return 0; //UNZ_PARAMERROR;
2110 offset64 = unzGetOffset64(file);
2111 return (uLong)offset64;
2112}
unsigned long long int ZPOS64_T
Definition: ioapi.h:99
ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)
Definition: unzip.c:2089

◆ unzGetOffset64()

ZPOS64_T ZEXPORT unzGetOffset64 ( unzFile  file)

Definition at line 2089 of file unzip.c.

2090{
2091 unz64_s* s;
2092
2093 if (file==NULL)
2094 return 0; //UNZ_PARAMERROR;
2095 s=(unz64_s*)file;
2096 if (!s->current_file_ok)
2097 return 0;
2098 if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
2099 if (s->num_file==s->gi.number_entry)
2100 return 0;
2101 return s->pos_in_central_dir;
2102}

Referenced by unzGetOffset().

◆ unzGoToFilePos()

int ZEXPORT unzGoToFilePos ( unzFile  file,
unz_file_pos file_pos 
)

Definition at line 1365 of file unzip.c.

1368{
1369 unz64_file_pos file_pos64;
1370 if (file_pos == NULL)
1371 return UNZ_PARAMERROR;
1372
1373 file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory;
1374 file_pos64.num_of_file = file_pos->num_of_file;
1375 return unzGoToFilePos64(file,&file_pos64);
1376}
int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos)
Definition: unzip.c:1343

◆ unzGoToFilePos64()

int ZEXPORT unzGoToFilePos64 ( unzFile  file,
const unz64_file_pos file_pos 
)

Definition at line 1343 of file unzip.c.

1344{
1345 unz64_s* s;
1346 int err;
1347
1348 if (file==NULL || file_pos==NULL)
1349 return UNZ_PARAMERROR;
1350 s=(unz64_s*)file;
1351
1352 /* jump to the right spot */
1353 s->pos_in_central_dir = file_pos->pos_in_zip_directory;
1354 s->num_file = file_pos->num_of_file;
1355
1356 /* set the current file */
1358 &s->cur_file_info_internal,
1359 NULL,0,NULL,0,NULL,0);
1360 /* return results */
1361 s->current_file_ok = (err == UNZ_OK);
1362 return err;
1363}
int unz64local_GetCurrentFileInfoInternal(unzFile file, unz_file_info64 *pfile_info, unz_file_info64_internal *pfile_info_internal, char *szFileName, uLong fileNameBufferSize, void *extraField, uLong extraFieldBufferSize, char *szComment, uLong commentBufferSize)
Definition: unzip.c:884

Referenced by unzGoToFilePos().

◆ unzSetOffset()

int ZEXPORT unzSetOffset ( unzFile  file,
uLong  pos 
)

Definition at line 2132 of file unzip.c.

2133{
2134 return unzSetOffset64(file,pos);
2135}
int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)
Definition: unzip.c:2114

◆ unzSetOffset64()

int ZEXPORT unzSetOffset64 ( unzFile  file,
ZPOS64_T  pos 
)

Definition at line 2114 of file unzip.c.

2115{
2116 unz64_s* s;
2117 int err;
2118
2119 if (file==NULL)
2120 return UNZ_PARAMERROR;
2121 s=(unz64_s*)file;
2122
2123 s->pos_in_central_dir = pos;
2124 s->num_file = s->gi.number_entry; /* hack */
2126 &s->cur_file_info_internal,
2127 NULL,0,NULL,0,NULL,0);
2128 s->current_file_ok = (err == UNZ_OK);
2129 return err;
2130}

Referenced by unzSetOffset().