Files
ZipArchive/README.md
T

66 lines
2.0 KiB
Markdown
Raw Normal View History

2015-11-07 08:48:00 -08:00
2016-05-31 13:21:33 -07:00
[![Build Status](https://travis-ci.org/ZipArchive/ZipArchive.svg?branch=master)](https://travis-ci.org/ZipArchive/ZipArchive)
# SSZipArchive
2015-04-06 15:44:13 -04:00
2015-07-12 12:32:46 +01:00
ZipArchive is a simple utility class for zipping and unzipping files on iOS and Mac.
2015-04-06 15:44:13 -04:00
2015-10-23 11:52:53 -04:00
- Unzip zip files;
- Unzip password protected zip files;
- Create new zip files;
- Append to existing zip files;
- Zip files;
- Zip-up NSData instances. (with a filename)
2015-04-06 15:44:13 -04:00
2015-10-23 11:52:53 -04:00
## Installation and Setup
2017-08-10 09:25:22 -07:00
*The main release branch is configured to support Objective C and Swift 3+. There is a 'swift23' branch which is a tied to a older 1.x release and will not be upgraded. Xcode 8.3+ removes support for Swift 2.3*
2016-09-21 08:53:11 -07:00
2015-10-23 11:52:53 -04:00
### CocoaPods
2017-07-20 20:52:11 +08:00
In your Podfile:
`pod 'SSZipArchive'`
2015-07-12 12:52:18 +01:00
2015-12-21 13:33:41 +00:00
### Carthage
2017-07-20 20:52:11 +08:00
In your Cartfile:
2015-12-21 13:33:41 +00:00
`github "ZipArchive/ZipArchive"`
2015-10-23 11:52:53 -04:00
### Manual
2015-07-12 12:52:18 +01:00
2015-10-23 11:52:53 -04:00
1. Add the `SSZipArchive` and `minizip` folders to your project.
2. Add the `libz` library to your target
SSZipArchive requires ARC.
## Usage
2015-04-06 15:44:13 -04:00
2015-10-23 14:23:12 -04:00
### Objective-C
2015-04-06 15:44:13 -04:00
```objective-c
2015-10-23 11:52:53 -04:00
// Create
[SSZipArchive createZipFileAtPath: zipPath withContentsOfDirectory: sampleDataPath];
// Unzip
[SSZipArchive unzipFileAtPath:zipPath toDestination: unzipPath];
2015-04-06 15:44:13 -04:00
```
2016-09-14 10:33:38 -07:00
### Swift
2015-10-23 14:23:12 -04:00
2015-10-23 11:52:53 -04:00
```swift
// Create
SSZipArchive.createZipFileAtPath(zipPath, withContentsOfDirectory: sampleDataPath)
// Unzip
SSZipArchive.unzipFileAtPath(zipPath, toDestination: unzipPath)
```
## License
2017-07-20 20:52:11 +08:00
SSZipArchive is protected under the [MIT license](https://github.com/samsoffes/ssziparchive/raw/master/LICENSE) and our slightly modified version of [Minizip](https://github.com/nmoinvaz/minizip) 1.1 is licensed under the [Zlib license](http://www.zlib.net/zlib_license.html).
2015-10-23 11:52:53 -04:00
## Acknowledgments
2017-07-20 20:52:11 +08:00
* Big thanks to [aish](http://code.google.com/p/ziparchive) for creating [ZipArchive](http://code.google.com/p/ziparchive). The project that inspired SSZipArchive.
* Thank you [@soffes](https://github.com/soffes) for the actual name of SSZipArchive.
* Thank you [@randomsequence](https://github.com/randomsequence) for implementing the creation support tech.
* Thank you [@johnezang](https://github.com/johnezang) for all his amazing help along the way.