A Swift framework for zipping and unzipping files. Simple and quick to use.
A Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of [nmoinvaz/minizip](https://github.com/nmoinvaz/minizip).
## Usage
## Usage
...
@@ -16,14 +16,37 @@ import Zip
...
@@ -16,14 +16,37 @@ import Zip
## Quick functions
## Quick functions
Zip includes two quick functions for zipping and unzipping files and they work as you would expect. Both functions take local file path urls.
The easiest way to use Zip is through quick functions. Both take local file paths as NSURLs, throw if an error is encountered and return an NSURL to the destination if successful.
tryZip().quickZipFiles([bb8FilePath],fileName:"archive")// Zip
letzipFilePath=tryZip().quickZipFiles([filePath],fileName:"archive")// Zip
}
}
catchErrorType{
catch{
print("Something went wrong")
}
```
## Advanced Zip
For more advanced usage, Zip has functions that let you set custom destination paths, work with password protected zips and use a progress handling closure. These function throw if there is an error but don't return.