Swiftpack.co - cxa/Piz as Swift Package

Swiftpack.co is a collection of thousands of indexed Swift packages. Search packages.
See all packages published by cxa.
cxa/Piz 2.0.1
The simplest unzipper just works. (Swift)
⭐️ 22
🕓 1 year ago
.package(url: "https://github.com/cxa/Piz.git", from: "2.0.1")

Piz

The simplest unzipper just works.

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
  • Apps available on the App Store: http://lazyapps.com
  • PayPal: xianan.chen+paypal 📧 gmail.com, buy me a cup of coffee if you find it's useful for you

Credits

License

MIT

GitHub

link
Stars: 22
Last commit: 1 year ago
jonrohan Something's broken? Yell at me @ptrpavlik. Praise and feedback (and money) is also welcome.

Release Notes

Working "Class" Hero
1 year ago

Struct, you just hurt me...

Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics