https://github.com/clemens-schulz/zippy
Framework for reading ZIP files on iOS
https://github.com/clemens-schulz/zippy
ios ios-swift swift-4 zip
Last synced: 10 months ago
JSON representation
Framework for reading ZIP files on iOS
- Host: GitHub
- URL: https://github.com/clemens-schulz/zippy
- Owner: clemens-schulz
- License: mit
- Created: 2017-01-17T18:24:19.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2019-03-28T20:33:07.000Z (about 7 years ago)
- Last Synced: 2025-04-20T08:05:07.484Z (about 1 year ago)
- Topics: ios, ios-swift, swift-4, zip
- Language: Swift
- Homepage:
- Size: 95.7 KB
- Stars: 2
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Zippy
Zippy is an iOS framework for reading ZIP files. It's written in Swift 4 and uses [Apple's compression framework](https://developer.apple.com/reference/compression) for decompression.
Please read the [TODO section](#todo) before using it!
## Features
- Easy to use
- Support for reading ZIP files using `FileWrapper` or `URL`
- Support for split ZIP files
- Tests
## Usage
``` swift
import Zippy
let fileURL =
let file = try! ZipFile(url: fileURL)
for filename in file {
let data = file[filename]
// Do something with file data…
}
```
## Installation
Zippy requires Swift 4 and iOS 10.0 or greater.
### CocoaPods
1. Make sure [CocoaPods](https://cocoapods.org) is installed and `cd` into your project directory.
2. Update your Podfile to include the following
``` ruby
pod 'Zippy'
```
3. Run `pod install`
### Manual
1. Submodule, clone, or download Zippy and drag the **Zippy.xcodeproj** file into your own project.
2. Select your project file in the Xcode sidebar, then select your target. In the **General** tab, click the **+** button under **Embedded Binaries**.
3. Select **Zippy.framework**.
4. **Add**.
The framework should appear under **Embedded Binaries** and **Linked Frameworks and Libraries**
## Tests
Testdata is generated automatically when running the tests for the first time. It's **about 640MB big** to test the framework with large files. I should probably add an option to skip the large file test…
## TODO
The framework is already usable, but it still ignores a lot of information in ZIP files. It has not been tested with ZIP files from different sources. Make sure to test it thoroughly before shipping your app.
There is still a lot do to:
- A lot of small stuff (see "// TODO:" in source code)
- Support for password-protected ZIP files
- Creating and editing ZIP files
- Support for more compression algorithms
- More and better tests
- More documentation in code
- Support for macOS (new target and tests)
Feel free to send pull requests or report bugs.