在iOS項目中用到解壓縮,用的是ZipArchive,下載點擊這裏,ZipArchive是基於minizip的,但不支持多線程,封裝的也不方便,然後就有了FastZipArchive,現在有一個粗糙的版本,下載點擊:
一 FastZipArchive的簡介如下:
1 基於ZipArchive和minizip的解壓框架
二 使用說明
FastZipArchive使用很簡便:
1將FastZipArchive下的文件引入你的工程
2創建一個FZipRequest的請求
NSString *sourcePath = [[[NSBundle mainBundle]resourcePath]stringByAppendingPathComponent:@"1.zip"];
NSString *desPath = @"1";
FZipRequest *re1 =[[FZipRequest alloc]init];
re1.zipFilePath = sourcePath;
re1.unZipFilePath = desPath;
re1.type = ZIP_TO_UNZIP;
re1.mode = FAST_MODE;
re1.delegate = self;
3將FZipRequest放入初始化好的FZipArchiveManager
_zipArchiveManager = [FZipArchiveManager defaultManager];
[_zipArchiveManager addTask:request];