技術方案:
1.第三方框架:
2.依賴于系統庫:libz.dylib
壓縮:
/**
*zipPath:產生zip文件的最終路徑
*sampleDataPath:需要進行壓縮的文件路徑
*/
[SSZipArchive ?createZipFileAtPath:zipPath withContentsOfDirectory:sampleDataPath];
/**
*path:產生zip文件的最終路徑
*/
+ (BOOL)createZipFileAtPath:(NSString*)path withFilesAtPaths:(NSArray*)paths;
解壓縮:
[SSZipArchive unzipFileAtPath:zipPath toDestination:unzipPath];