CCZipFile *CCZipFile::createWithBuffer(const void* buffer, uLong size) { CCZipFile *zip = new CCZipFile(); if (zip->initWithBuffer(buffer, size)) { zip->autorelease(); return zip; } else { delete zip; return NULL; } }
CCZipFile *CCZipFile::create(const char *zipFilename) { CCZipFile *zip = new CCZipFile(); if (zip->initWithFilename(zipFilename)) { zip->autorelease(); return zip; } else { delete zip; return NULL; } }