SSZipArchive使用详解
2015-11-03 16:30
295 查看
SSZipArchive功能:
解压zip文件
解压密码保护的zip文件
创建zip文件
追加到zip文件
压缩文件
使用一个名字来压缩NSData
使用前:
把SSZipArchive文件添加到项目中
在target中添加libz.dylib
使用方法:
[objc] view
plaincopy
// 解压
NSString *zipPath = @"被解压的文件路径";
NSString *destinationPath = @"解压到的目录";
[SSZipArchive unzipFileAtPath:zipPath toDestination:destinationPath];
// 压缩
NSString *zippedPath = @"压缩文件路径";
NSArray *inputPaths = [NSArray arrayWithObjects:
[[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"],
[[NSBundle mainBundle] pathForResource:@"photo2" ofType:@"jpg"]
nil nil];
[SSZipArchive createZipFileAtPath:zippedPath withFilesAtPaths:inputPaths];
解压zip文件
解压密码保护的zip文件
创建zip文件
追加到zip文件
压缩文件
使用一个名字来压缩NSData
使用前:
把SSZipArchive文件添加到项目中
在target中添加libz.dylib
使用方法:
[objc] view
plaincopy
// 解压
NSString *zipPath = @"被解压的文件路径";
NSString *destinationPath = @"解压到的目录";
[SSZipArchive unzipFileAtPath:zipPath toDestination:destinationPath];
// 压缩
NSString *zippedPath = @"压缩文件路径";
NSArray *inputPaths = [NSArray arrayWithObjects:
[[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"],
[[NSBundle mainBundle] pathForResource:@"photo2" ofType:@"jpg"]
nil nil];
[SSZipArchive createZipFileAtPath:zippedPath withFilesAtPaths:inputPaths];
相关文章推荐
- 敏捷开发知识体系笔记
- windows下生成zlib1.dll
- django自学2
- 各种排序算法时间复杂度和空间复杂度表
- Oracle中泄露“天机”的TNS
- 基于华为java编程规范的checkstyle.xml以及格式化模版,注释模版
- 20135218——信息安全系统设计基础期中总结
- 基于华为java编程规范的checkstyle.xml以及格式化模版,注释模版
- 【NOIP复习】【数学】
- vs2010 问题 >LINK : fatal error LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
- 注销
- 20135218——信息安全系统设计基础期中总结
- 多个code.csdn.net账号切换
- Significant Changes in the Role of Women
- 记录下a++和++a的区别
- xml约束技术之dtd
- ListIterator和Iterator区别第十二篇
- 重新定位svn地址的方法(windows和linux),svn switch(sw)的帮助信息
- vncviewer远程登陆mac总是崩溃,提示Rect too large: 1282x900
- windows下python开发环境搭建