文件压缩解压缩

技术方案:

1.第三方框架:

SSZipArchive

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];

你可能感兴趣的:(文件压缩解压缩)