![]() |
cocos2d-iphone
2.1
Improved Cocos2D API Reference (iOS version) for www.kobold2d.com developers
|
#import <stdint.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) |
Zip helper functions
int ccInflateCCZFile | ( | const char * | filename, |
unsigned char ** | out | ||
) |
inflates a CCZ file into memory
int ccInflateGZipFile | ( | const char * | filename, |
unsigned char ** | out | ||
) |
inflates a GZip file into memory
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.
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.