引入第三方库SSZipArchive
压缩文件
[SSZipArchive createZipFileAtPath:@"/Users/Apple/Desktop/123.zip" withContentsOfDirectory:@"/Users/Apple/Desktop/images"];
解压文件
[[[NSURLSession sharedSession] downloadTaskWithURL:url completionHandler:^(NSURL * _Nullable location, NSURLResponse * _Nullable response, NSError * _Nullable error) {
//解压
[SSZipArchive unzipFileAtPath:location.path toDestination:[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]];
NSLog(@"解压完成 %@",location);
}] resume];