压缩解压缩

下载地址:https://github.com/ZipArchive/ZipArchive

  • 需要引入libz.dylib框架

  • 导入头文件Main.h

  • 创建压缩文件

+(BOOL)createZipFileAtPath:(NSString
*)path withFilesAtPaths:(NSArray
*)paths;

+(BOOL)createZipFileAtPath:(NSString
*)path withContentsOfDirectory:(NSString
*)directoryPath;
  • 解压
+(BOOL)unzipFileAtPath:(NSString
*)path  toDestination:(NSString
*)destination
压缩解压缩_第1张图片
压缩解压缩.png

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