iOS SSZipArchive

SSZipArchive使用详解

注意1:

[SSZipArchive createZipFileAtPath:zippedPath withFilesAtPaths:inputPaths];  

withFilesAtPaths后跟的参数是数组,如果要对mainBundle某种文件格式打包压缩,可以用下面的代码:

NSArray *inputsPaths = [[NSBundle mainBundle] pathsForResourcesOfType:@"png" inDirectory:nil];

 

注意2:最好将压缩和解压缩放在子线程中

    dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{

            // 压缩或解压操作

    });

 

posted @ 2015-01-19 21:34  oumygade  阅读(428)  评论(0编辑  收藏  举报