1 Star 0 Fork 0

ios_shen / SSZipArchive

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

SSZipArchive

SSZipArchive is a simple utility class for zipping and unzipping files. Features:

  • Unzipping zip files
  • Unzipping password protected zip files
  • Creating zip files
  • Appending to zip files
  • Zipping files
  • Zipping NSData with a filename

Adding to your project

  1. Add the SSZipArchive and minizip folders to your project.
  2. Add the libz library to your target

SSZipArchive requires ARC.

Usage

// Unzipping
NSString *zipPath = @"path_to_your_zip_file";
NSString *destinationPath = @"path_to_the_folder_where_you_want_it_unzipped";
[SSZipArchive unzipFileAtPath:zipPath toDestination:destinationPath];

// Zipping
NSString *zippedPath = @"path_where_you_want_the_file_created";
NSArray *inputPaths = [NSArray arrayWithObjects:
                       [[NSBundle mainBundle] pathForResource:@"photo1" ofType:@"jpg"],
                       [[NSBundle mainBundle] pathForResource:@"photo2" ofType:@"jpg"]
                       nil];
[SSZipArchive createZipFileAtPath:zippedPath withFilesAtPaths:inputPaths];

Tests

Simply, open the Xcode 5 or higher project in the Tests directory and press Command-U to run the tests.

License

SSZipArchive is licensed under the MIT license. A slightly modified version of Minizip 1.1 is also included and is licensed under the Zlib license.

Thanks

Thanks aish for creating ZipArchive which SSZipArchive is based on, Johnnie Walker (@randomsequence) for implementing creation support, and John Engelhart (@johnezang) for all his amazing help along the way.

Copyright (c) 2010-2013 Sam Soffes, http://soff.es Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

暂无描述 展开 收起
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
1
https://gitee.com/ios_shen/SSZipArchive.git
git@gitee.com:ios_shen/SSZipArchive.git
ios_shen
SSZipArchive
SSZipArchive
master

搜索帮助