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), ^{

            // 压缩或解压操作

    });

原文地址:https://www.cnblogs.com/oumygade/p/4234801.html