fixed #701, CCZHeader.version should be an unsigned short, instead of unsigned char. Keep the same to cocos2d-iphone

This commit is contained in:
Walzer 2011-08-30 15:26:17 +08:00
parent 9f1e26f8a0
commit 554e3fda52
1 changed files with 9 additions and 9 deletions

View File

@ -32,7 +32,7 @@ namespace cocos2d
struct CCZHeader {
unsigned char sig[4]; // signature. Should be 'CCZ!' 4 bytes
unsigned short compression_type; // should 0
unsigned char version; // should be 2 (although version type==1 is also supported)
unsigned short version; // should be 2 (although version type==1 is also supported)
unsigned int reserved; // Reserverd for users.
unsigned int len; // size of the uncompressed file
};
@ -47,14 +47,14 @@ namespace cocos2d
class ZipUtils
{
public:
/**
* 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 enought 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
/**
* 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 enought 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
*/
static int ccInflateMemory(unsigned char *in, unsigned int inLength, unsigned char **out);