zoukankan      html  css  js  c++  java
  • SSZipArchive使用详解

    下载SSZipArchive,点击我。或者自己在这里下载。

    SSZipArchive功能:

    1. 解压zip文件
    2. 解压密码保护的zip文件
    3. 创建zip文件
    4. 追加到zip文件
    5. 压缩文件
    6. 使用一个名字来压缩NSData

    使用前:

    1. 把SSZipArchive文件添加到项目中
    2. 在target中添加libz.dylib
    使用方法:
    1. // 解压  
    2. NSString *zipPath = @"被解压的文件路径";  
    3. NSString *destinationPath = @"解压到的目录";  
    4. [SSZipArchive unzipFileAtPath:zipPath toDestination:destinationPath];  
    5.   
    6. // 压缩  
    7. NSString *zippedPath = @"压缩文件路径";  
    8. NSArray *inputPaths = [NSArray arrayWithObjects:  
    9.                        [[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"],  
    10.                        [[NSBundle mainBundle] pathForResource:@"photo2" ofType:@"jpg"]  
    11.                        nil nil];  
    12. [SSZipArchive createZipFileAtPath:zippedPath withFilesAtPaths:inputPaths];  
  • 相关阅读:
    模块 hashlib模块
    设计模式
    类中双下方法
    工作小结 常见定制类
    python collections模块
    启动脚本
    anaconda镜像
    理解python的可变参数
    使用spark
    python 异常处理
  • 原文地址:https://www.cnblogs.com/geek6/p/4131057.html
Copyright © 2011-2022 走看看