在项目中需要做模块下载更新操作,其中需用到解压zip文件,发现一个比较好用的解压第三方
下载地址
1、导入SSZipArchive
2、使用时需添加libz库
3、使用方法:
//解压
BOOL isAlerady=[SSZipArchive unzipFileAtPath:@"需解压文件地址" toDestination:@"存放解压后文件的地址"];
//如果解压成功返回Yes,解压失败返回No
//压缩
NSString *zippedPath = @"压缩文件路径";
NSArray *inputPaths = @[@"需压缩地址1",@"需压缩地址2"];
Bool isTure=[SSZipArchive createZipFileAtPath:zippedPath withFile sAtPaths:inputPaths];
目前只使用到简单压缩和解压的方法,其他方法可以研究一下。