Files
ZipArchive/README.md
T

60 lines
1.7 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
### CocoaPods
`pod install SSZipArchive`
2015-07-12 12:52:18 +01:00
2015-12-21 13:33:41 +00:00
### Carthage
`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
```
2015-10-23 14:23:12 -04:00
### Swift
2015-10-23 11:52:53 -04:00
```swift
// Create
SSZipArchive.createZipFileAtPath(zipPath, withContentsOfDirectory: sampleDataPath)
// Unzip
SSZipArchive.unzipFileAtPath(zipPath, toDestination: unzipPath)
```
## License
SSZipArchive is protected under the [MIT license](https://github.com/samsoffes/ssziparchive/raw/master/LICENSE) and our slightly modified version of [Minizip](http://www.winimage.com/zLibDll/minizip.html) 1.1 is licensed under the [Zlib license](http://www.zlib.net/zlib_license.html).
## Acknowledgments
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 [@randomsequence](https://github.com/randomsequence) for implementing the creation support tech and to [@johnezang](https://github.com/johnezang) for all his amazing help along the way.