예제 #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;
    }
}