{"id":15036721,"url":"https://github.com/marmelroy/zip","last_synced_at":"2026-04-09T17:32:57.733Z","repository":{"id":37431515,"uuid":"47931290","full_name":"marmelroy/Zip","owner":"marmelroy","description":"Swift framework for zipping and unzipping files.","archived":false,"fork":false,"pushed_at":"2024-08-05T18:42:46.000Z","size":8362,"stargazers_count":2548,"open_issues_count":116,"forks_count":463,"subscribers_count":42,"default_branch":"master","last_synced_at":"2025-05-07T15:56:37.606Z","etag":null,"topics":["compression","files","swift","unzip","zip"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marmelroy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-12-13T18:34:14.000Z","updated_at":"2025-05-07T03:15:27.000Z","dependencies_parsed_at":"2022-07-12T15:20:46.391Z","dependency_job_id":"29060f79-aa34-4509-b0b5-87ba7c36c25e","html_url":"https://github.com/marmelroy/Zip","commit_stats":{"total_commits":226,"total_committers":35,"mean_commits":6.457142857142857,"dds":0.4247787610619469,"last_synced_commit":"67fa55813b9e7b3b9acee9c0ae501def28746d76"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marmelroy%2FZip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marmelroy%2FZip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marmelroy%2FZip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marmelroy%2FZip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marmelroy","download_url":"https://codeload.github.com/marmelroy/Zip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254119494,"owners_count":22017951,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compression","files","swift","unzip","zip"],"created_at":"2024-09-24T20:32:07.398Z","updated_at":"2026-04-09T17:32:57.656Z","avatar_url":"https://github.com/marmelroy.png","language":"Swift","readme":"![Zip - Zip and unzip files in Swift](https://cloud.githubusercontent.com/assets/889949/12374908/252373d0-bcac-11e5-8ece-6933aeae8222.png)\n\n[![Build Status](https://travis-ci.org/marmelroy/Zip.svg?branch=master)](https://travis-ci.org/marmelroy/Zip) [![Version](http://img.shields.io/cocoapods/v/Zip.svg)](http://cocoapods.org/?q=Zip) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) [![SPM supported](https://img.shields.io/badge/SPM-supported-brightgreen.svg?style=flat)](https://swift.org/package-manager)\n\n\n# Zip\nA Swift framework for zipping and unzipping files. Simple and quick to use. Built on top of [minizip](https://github.com/nmoinvaz/minizip).\n\n## Usage\n\nImport Zip at the top of the Swift file.\n\n```swift\nimport Zip\n```\n\n## Quick functions\n\nThe 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.\n```swift\ndo {\n    let filePath = Bundle.main.url(forResource: \"file\", withExtension: \"zip\")!\n    let unzipDirectory = try Zip.quickUnzipFile(filePath) // Unzip\n    let zipFilePath = try Zip.quickZipFiles([filePath], fileName: \"archive\") // Zip\n}\ncatch {\n  print(\"Something went wrong\")\n}\n```\n\n## Advanced Zip\n\nFor 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 functions throw if there is an error but don't return.\n```swift\ndo {\n    let filePath = Bundle.main.url(forResource: \"file\", withExtension: \"zip\")!\n    let documentsDirectory = FileManager.default.urls(for:.documentDirectory, in: .userDomainMask)[0]\n    try Zip.unzipFile(filePath, destination: documentsDirectory, overwrite: true, password: \"password\", progress: { (progress) -\u003e () in\n        print(progress)\n    }) // Unzip\n\n    let zipFilePath = documentsFolder.appendingPathComponent(\"archive.zip\")\n    try Zip.zipFiles([filePath], zipFilePath: zipFilePath, password: \"password\", progress: { (progress) -\u003e () in\n        print(progress)\n    }) //Zip\n\n}\ncatch {\n  print(\"Something went wrong\")\n}\n```\n\n## Custom File Extensions\n\nZip supports '.zip' and '.cbz' files out of the box. To support additional zip-derivative file extensions:\n```swift\nZip.addCustomFileExtension(\"file-extension-here\")\n```\n\n### [Preferred] Setting up with [Swift Package Manager](https://swift.org/package-manager)\nTo use Zip with Swift Package Manager, add it to your package's dependencies:\n```swift\n.package(url: \"https://github.com/marmelroy/Zip.git\", .upToNextMinor(from: \"2.1\"))\n```\n\n### Setting up with [CocoaPods](http://cocoapods.org/?q=Zip)\n```ruby\nsource 'https://github.com/CocoaPods/Specs.git'\npod 'Zip', '~\u003e 2.1'\n```\n\n### Setting up with [Carthage](https://github.com/Carthage/Carthage)\nTo integrate Zip into your Xcode project using Carthage, specify it in your `Cartfile`:\n\n```ogdl\ngithub \"marmelroy/Zip\" ~\u003e 2.1\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarmelroy%2Fzip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarmelroy%2Fzip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarmelroy%2Fzip/lists"}