Пример #1
0
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;
    }
}
Пример #2
0
CCZipFile *CCZipFile::create(const char *zipFilename)
{
    CCZipFile *zip = new CCZipFile();
    if (zip->initWithFilename(zipFilename))
    {
        zip->autorelease();
        return zip;
    }
    else
    {
        delete zip;
        return NULL;
    }
}