【发布时间】:2014-01-07 17:02:29
【问题描述】:
我正在寻找一种在支持 arm64 的 ios 上压缩和解压缩文件的方法。我在看 Github,但没有一个支持 arm64。是否已经有用于压缩和解压缩文件的现成库。 (如果您知道如何集成 7zip、bzip2、gzip、rar 的方法,我会很高兴的)
我现在正在使用 SSZipArchive,但它不起作用:
#import "SSZipArchive.h"
NSArray *nameWithoutExtention = [[[[self files] objectAtIndex:indexPath.row] lastPathComponent] componentsSeparatedByString:@"."];
NSString *fileName = [nameWithoutExtention objectAtIndex:0];
NSString *destPath = [NSString stringWithFormat:@"%@/%@", self.directory, fileName];
[fileManager createDirectoryAtPath:destPath withIntermediateDirectories:YES attributes:nil error:nil];
[SSZipArchive unzipFileAtPath:[[self files] objectAtIndex:indexPath.row] toDestination:destPath];
【问题讨论】:
-
这有什么关系?如果它们是开源的,您可以自己编译为 64 位。
-
但是当我添加 github.com/dive/ALZipArchive 时,我收到很多错误消息,我无法修复,所以我认为必须已经有一个固定的项目/库
-
我使用 GTMNSData+zlib。它是为我所要求的一切而编译的。
-
有哪些错误?
-
你为什么不使用 zlib 并且你可以制作静态库,或者只是将所有 .c 文件也添加到你的项目中
标签: ios objective-c zip unzip bzip2