https://github.com/cxa/piz
The simplest unzipper just works. (Swift)
https://github.com/cxa/piz
Last synced: about 1 year ago
JSON representation
The simplest unzipper just works. (Swift)
- Host: GitHub
- URL: https://github.com/cxa/piz
- Owner: cxa
- License: mit
- Created: 2015-02-28T05:19:18.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2020-12-12T03:58:50.000Z (over 5 years ago)
- Last Synced: 2025-04-18T09:42:31.138Z (about 1 year ago)
- Language: Swift
- Homepage:
- Size: 467 KB
- Stars: 22
- Watchers: 1
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Piz
The simplest unzipper just works.
```swift
import Piz
...
// create an unzipper with file URL or data
if let piz = Piz(fileURL: url) { // or let piz = Piz(data: data)
// get all file names, including paths if available
let files = piz.files
// check if a file be available
let isFileExisting = piz.contains(file: "path/to/file.ext")
// get data from a file
let data = piz.data(forFile: "path/to/file.ext")
// or if you like subscription
let data = piz["path/to/file.ext"]
}
```
## Install
Swift package only, add this repo URL to your `Package.swift`.
## About Me
- Twitter: [@_cxa](https://twitter.com/_cxa)
- Apps available on the App Store:
- PayPal: xianan.chen+paypal 📧 gmail.com, buy me a cup of coffee if you find it's useful for you
## Credits
- Test file `test.epub` downloaded from
- Test zip64 file `64.zip` created with
## License
MIT