cocos2d-iphone  2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Properties Defines
ZipUtils.h File Reference
#import <stdint.h>
+ Include dependency graph for ZipUtils.h:

Classes

struct  CCZHeader

Enumerations

enum  { CCZ_COMPRESSION_ZLIB, CCZ_COMPRESSION_BZIP2, CCZ_COMPRESSION_GZIP, CCZ_COMPRESSION_NONE }

Functions

int ccInflateMemory (unsigned char *in, unsigned int inLength, unsigned char **out)
int ccInflateMemoryWithHint (unsigned char *in, unsigned int inLength, unsigned char **out, unsigned int outlengthHint)
int ccInflateGZipFile (const char *filename, unsigned char **out)
int ccInflateCCZFile (const char *filename, unsigned char **out)

Detailed Description

Zip helper functions


Function Documentation

int ccInflateCCZFile ( const char *  filename,
unsigned char **  out 
)

inflates a CCZ file into memory

Returns:
the length of the deflated buffer
Since:
v0.99.5
int ccInflateGZipFile ( const char *  filename,
unsigned char **  out 
)

inflates a GZip file into memory

Returns:
the length of the deflated buffer
Since:
v0.99.5
int ccInflateMemory ( unsigned char *  in,
unsigned int  inLength,
unsigned char **  out 
)

Inflates either zlib or gzip deflated memory. The inflated memory is expected to be freed by the caller.

It will allocate 256k for the destination buffer. If it is not enough it will multiply the previous buffer size per 2, until there is enough memory.

Returns:
the length of the deflated buffer
Since:
v0.8.1
int ccInflateMemoryWithHint ( unsigned char *  in,
unsigned int  inLength,
unsigned char **  out,
unsigned int  outlengthHint 
)

Inflates either zlib or gzip deflated memory. The inflated memory is expected to be freed by the caller.

outlengthHint is assumed to be the needed room to allocate the inflated buffer.

Returns:
the length of the deflated buffer
Since:
v1.0.0