Oolite
Loading...
Searching...
No Matches
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)

◆ UNZ_CRCERROR

#define UNZ_CRCERROR   (-105)

Definition at line 82 of file unzip.h.

Referenced by unzCloseCurrentFile().

◆ UNZ_END_OF_LIST_OF_FILE

#define UNZ_END_OF_LIST_OF_FILE   (-100)

Definition at line 76 of file unzip.h.

Referenced by unzGetFilePos64(), unzGoToNextFile(), unzLocateFile(), and unzReadCurrentFile().

◆ UNZ_EOF

#define UNZ_EOF   (0)

Definition at line 78 of file unzip.h.

Referenced by unz64local_getByte(), and unzReadCurrentFile().

◆ UNZ_ERRNO

◆ UNZ_INTERNALERROR

#define UNZ_INTERNALERROR   (-104)

Definition at line 81 of file unzip.h.

Referenced by unzOpenCurrentFile3().

◆ UNZ_OK

◆ UNZ_PARAMERROR

◆ Z_BZIP2ED

#define Z_BZIP2ED   12

Typedef Documentation

◆ tm_unz

typedef struct tm_unz_s tm_unz

◆ unz64_file_pos

◆ unz_file_info

◆ unz_file_info64

◆ unz_file_pos

typedef struct unz_file_pos_s unz_file_pos

◆ unz_global_info

◆ unz_global_info64

◆ unzFile

typedef voidp unzFile

Definition at line 72 of file unzip.h.

Function Documentation

◆ OF() [1/16]

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

References unzStringFileNameCompare().

Here is the call graph for this function:

◆ OF() [2/16]

unzFile ZEXPORT unzOpen OF ( (const char *path) )
extern

References unzOpen().

Here is the call graph for this function:

◆ OF() [3/16]

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

References unzOpen2().

Here is the call graph for this function:

◆ OF() [4/16]

unzFile ZEXPORT unzOpen64 OF ( (const void *path) )
extern

References unzOpen64().

Here is the call graph for this function:

◆ OF() [5/16]

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

References unzOpen2_64().

Here is the call graph for this function:

◆ OF() [6/16]

int ZEXPORT unzeof OF ( (unzFile file) )
extern

Addition for GDAL : START

Addition for GDAL : END

References unzClose().

Here is the call graph for this function:

◆ OF() [7/16]

int ZEXPORT unzGetGlobalComment OF ( (unzFile file, char *szComment, uLong uSizeBuf) )
extern

References unzGetGlobalComment(), unzGoToFirstFile(), and unzGoToNextFile().

Here is the call graph for this function:

◆ OF() [8/16]

int ZEXPORT unzOpenCurrentFilePassword OF ( (unzFile file, const char *password) )
extern

References unzOpenCurrentFilePassword().

Here is the call graph for this function:

◆ OF() [9/16]

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

References unzLocateFile().

Here is the call graph for this function:

◆ OF() [10/16]

int ZEXPORT unzOpenCurrentFile2 OF ( (unzFile file, int *method, int *level, int raw) )
extern

References unzOpenCurrentFile2().

Here is the call graph for this function:

◆ OF() [11/16]

int ZEXPORT unzOpenCurrentFile3 OF ( (unzFile file, int *method, int *level, int raw, const char *password) )
extern

References unzCloseCurrentFile(), and unzOpenCurrentFile3().

Here is the call graph for this function:

◆ 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) )
extern

References unzGetCurrentFileInfo(), unzGetCurrentFileZStreamPos64(), and unzOpenCurrentFile().

Here is the call graph for this function:

◆ 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) )
extern

References unzGetCurrentFileInfo64().

Here is the call graph for this function:

◆ OF() [14/16]

int ZEXPORT unzGetGlobalInfo OF ( (unzFile file, unz_global_info *pglobal_info) )
extern

References unzGetGlobalInfo().

Here is the call graph for this function:

◆ OF() [15/16]

int ZEXPORT unzGetGlobalInfo64 OF ( (unzFile file, unz_global_info64 *pglobal_info) )
extern

References unzGetGlobalInfo64().

Here is the call graph for this function:

◆ OF() [16/16]

int ZEXPORT unzGetLocalExtrafield OF ( (unzFile file, voidp buf, unsigned len) )
extern

References unzeof(), unzGetLocalExtrafield(), unzReadCurrentFile(), unztell(), and unztell64().

Here is the call graph for this function:

◆ unzGetFilePos()

int ZEXPORT unzGetFilePos ( unzFile file,
unz_file_pos * file_pos )
extern

Definition at line 1250 of file unzip.c.

1253{
1254 unz64_file_pos file_pos64;
1255 int err = unzGetFilePos64(file, &file_pos64);
1256 if (err == UNZ_OK) {
1257 file_pos->pos_in_zip_directory = (uLong)file_pos64.pos_in_zip_directory;
1258 file_pos->num_of_file = (uLong)file_pos64.num_of_file;
1259 }
1260 return err;
1261}
mz_ulong uLong
Definition miniz.h:440
ZPOS64_T num_of_file
Definition unzip.h:264
ZPOS64_T pos_in_zip_directory
Definition unzip.h:263
uLong num_of_file
Definition unzip.h:251
uLong pos_in_zip_directory
Definition unzip.h:250
int ZEXPORT unzGetFilePos64(unzFile file, unz64_file_pos *file_pos)
Definition unzip.c:1234
struct unz64_file_pos_s unz64_file_pos
#define UNZ_OK
Definition unzip.h:75

References unz64_file_pos_s::num_of_file, unz_file_pos_s::num_of_file, unz64_file_pos_s::pos_in_zip_directory, unz_file_pos_s::pos_in_zip_directory, UNZ_OK, and unzGetFilePos64().

Here is the call graph for this function:

◆ unzGetFilePos64()

int ZEXPORT unzGetFilePos64 ( unzFile file,
unz64_file_pos * file_pos )
extern

Definition at line 1234 of file unzip.c.

1235{
1236 unz64_s* s;
1237
1238 if (file == NULL || file_pos == NULL)
1239 return UNZ_PARAMERROR;
1240 s = (unz64_s*)file;
1241 if (!s->current_file_ok)
1243
1245 file_pos->num_of_file = s->num_file;
1246
1247 return UNZ_OK;
1248}
ZPOS64_T pos_in_central_dir
Definition unzip.c:171
ZPOS64_T current_file_ok
Definition unzip.c:172
ZPOS64_T num_file
Definition unzip.c:170
#define UNZ_END_OF_LIST_OF_FILE
Definition unzip.h:76
#define UNZ_PARAMERROR
Definition unzip.h:79

References unz64_s::current_file_ok, unz64_s::num_file, unz64_file_pos_s::num_of_file, unz64_s::pos_in_central_dir, unz64_file_pos_s::pos_in_zip_directory, UNZ_END_OF_LIST_OF_FILE, UNZ_OK, and UNZ_PARAMERROR.

Referenced by unzGetFilePos().

Here is the caller graph for this function:

◆ unzGetOffset()

uLong ZEXPORT unzGetOffset ( unzFile file)
extern

Definition at line 1976 of file unzip.c.

1977{
1978 ZPOS64_T offset64;
1979
1980 if (file == NULL)
1981 return 0; // UNZ_PARAMERROR;
1982 offset64 = unzGetOffset64(file);
1983 return (uLong)offset64;
1984}
unsigned long long int ZPOS64_T
Definition ioapi.h:97
ZPOS64_T ZEXPORT unzGetOffset64(unzFile file)
Definition unzip.c:1961

References unzGetOffset64().

Here is the call graph for this function:

◆ unzGetOffset64()

ZPOS64_T ZEXPORT unzGetOffset64 ( unzFile file)
extern

Definition at line 1961 of file unzip.c.

1962{
1963 unz64_s* s;
1964
1965 if (file == NULL)
1966 return 0; // UNZ_PARAMERROR;
1967 s = (unz64_s*)file;
1968 if (!s->current_file_ok)
1969 return 0;
1970 if (s->gi.number_entry != 0 && s->gi.number_entry != 0xffff)
1971 if (s->num_file == s->gi.number_entry)
1972 return 0;
1973 return s->pos_in_central_dir;
1974}
unz_global_info64 gi
Definition unzip.c:168
ZPOS64_T number_entry
Definition unzip.h:97

References unz64_s::current_file_ok, unz64_s::gi, unz64_s::num_file, unz_global_info64_s::number_entry, and unz64_s::pos_in_central_dir.

Referenced by unzGetOffset().

Here is the caller graph for this function:

◆ unzGoToFilePos()

int ZEXPORT unzGoToFilePos ( unzFile file,
unz_file_pos * file_pos )
extern

Definition at line 1285 of file unzip.c.

1288{
1289 unz64_file_pos file_pos64;
1290 if (file_pos == NULL)
1291 return UNZ_PARAMERROR;
1292
1293 file_pos64.pos_in_zip_directory = file_pos->pos_in_zip_directory;
1294 file_pos64.num_of_file = file_pos->num_of_file;
1295 return unzGoToFilePos64(file, &file_pos64);
1296}
int ZEXPORT unzGoToFilePos64(unzFile file, const unz64_file_pos *file_pos)
Definition unzip.c:1263

References unz64_file_pos_s::num_of_file, unz_file_pos_s::num_of_file, unz64_file_pos_s::pos_in_zip_directory, unz_file_pos_s::pos_in_zip_directory, UNZ_PARAMERROR, and unzGoToFilePos64().

Here is the call graph for this function:

◆ unzGoToFilePos64()

int ZEXPORT unzGoToFilePos64 ( unzFile file,
const unz64_file_pos * file_pos )
extern

Definition at line 1263 of file unzip.c.

1264{
1265 unz64_s* s;
1266 int err;
1267
1268 if (file == NULL || file_pos == NULL)
1269 return UNZ_PARAMERROR;
1270 s = (unz64_s*)file;
1271
1272 /* jump to the right spot */
1274 s->num_file = file_pos->num_of_file;
1275
1276 /* set the current file */
1279 NULL, 0, NULL, 0, NULL, 0);
1280 /* return results */
1281 s->current_file_ok = (err == UNZ_OK);
1282 return err;
1283}
unz_file_info64 cur_file_info
Definition unzip.c:179
unz_file_info64_internal cur_file_info_internal
Definition unzip.c:180
local 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:837

References unz64_s::cur_file_info, unz64_s::cur_file_info_internal, unz64_s::current_file_ok, unz64_s::num_file, unz64_file_pos_s::num_of_file, unz64_s::pos_in_central_dir, unz64_file_pos_s::pos_in_zip_directory, unz64local_GetCurrentFileInfoInternal(), UNZ_OK, and UNZ_PARAMERROR.

Referenced by unzGoToFilePos().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ unzSetOffset()

int ZEXPORT unzSetOffset ( unzFile file,
uLong pos )
extern

Definition at line 2004 of file unzip.c.

2005{
2006 return unzSetOffset64(file, pos);
2007}
int ZEXPORT unzSetOffset64(unzFile file, ZPOS64_T pos)
Definition unzip.c:1986

References unzSetOffset64().

Here is the call graph for this function:

◆ unzSetOffset64()

int ZEXPORT unzSetOffset64 ( unzFile file,
ZPOS64_T pos )
extern

Definition at line 1986 of file unzip.c.

1987{
1988 unz64_s* s;
1989 int err;
1990
1991 if (file == NULL)
1992 return UNZ_PARAMERROR;
1993 s = (unz64_s*)file;
1994
1995 s->pos_in_central_dir = pos;
1996 s->num_file = s->gi.number_entry; /* hack */
1999 NULL, 0, NULL, 0, NULL, 0);
2000 s->current_file_ok = (err == UNZ_OK);
2001 return err;
2002}

References unz64_s::cur_file_info, unz64_s::cur_file_info_internal, unz64_s::current_file_ok, unz64_s::gi, unz64_s::num_file, unz_global_info64_s::number_entry, unz64_s::pos_in_central_dir, unz64local_GetCurrentFileInfoInternal(), UNZ_OK, and UNZ_PARAMERROR.

Referenced by unzSetOffset().

Here is the call graph for this function:
Here is the caller graph for this function: