{"id":25000061,"url":"https://github.com/tomasf/zip","last_synced_at":"2025-07-18T01:34:11.200Z","repository":{"id":267794558,"uuid":"900784729","full_name":"tomasf/Zip","owner":"tomasf","description":"Miniz-based Zip archive library for Swift","archived":false,"fork":false,"pushed_at":"2025-06-27T09:50:15.000Z","size":112,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-05T20:41:30.748Z","etag":null,"topics":["swift","zip"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomasf.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2024-12-09T13:19:31.000Z","updated_at":"2025-06-27T09:44:58.000Z","dependencies_parsed_at":"2024-12-12T14:20:05.298Z","dependency_job_id":"e27a2b15-e76e-49ae-92bd-d60486e7fa18","html_url":"https://github.com/tomasf/Zip","commit_stats":null,"previous_names":["tomasf/zip"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/tomasf/Zip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasf%2FZip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasf%2FZip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasf%2FZip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasf%2FZip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomasf","download_url":"https://codeload.github.com/tomasf/Zip/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomasf%2FZip/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265688320,"owners_count":23811416,"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":["swift","zip"],"created_at":"2025-02-04T19:31:10.393Z","updated_at":"2025-07-18T01:34:11.179Z","avatar_url":"https://github.com/tomasf.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Zip\n\nZip is a lightweight cross-platform Swift package for working with Zip archives. It's built on top of [Miniz](https://github.com/richgel999/miniz) and includes its entire implementation, so no external dependencies are required.\n\nZip runs on Linux, Windows and all Apple platforms.\n\n[![Swift](https://github.com/tomasf/Zip/actions/workflows/swift.yml/badge.svg)](https://github.com/tomasf/Zip/actions/workflows/swift.yml) ![Platforms](https://img.shields.io/badge/Platforms-macOS_%7C_iOS_%7C_tvOS_%7C_watchOS_%7C_visionOS_%7C_Linux_%7C_Windows-47D?logo=swift\u0026logoColor=white)\n\n## Features\n\n- Add and read files from ZIP archives.\n- Support for both file-based and in-memory archives.\n- Iterative reading of files in chunk.\n- Configurable compression levels.\n- Minimalistic and modern Swift API.\n\n## Installation\nAdd the package to your project using Swift Package Manager. In your `Package.swift` file:\n\n```swift\ndependencies: [\n    .package(url: \"https://github.com/tomasf/Zip.git\", from: \"2.0.0\")\n]\n```\n\n## Examples\n### Making a new memory-based archive\n\n```swift\nlet archive = ZipArchive()\ntry archive.addFile(at: \"content.json\", data: jsonData)\nlet zipData = try archive.finalize()\n```\n\n### Reading from an existing archive in memory\n\n```swift\nlet newArchive = try ZipArchive(data: zipData)\n\nlet data = try archive.fileContents(at: \"hello.txt\")\nif let text = String(data: data, encoding: .utf8) {\n    print(\"Hello.txt contains: \\(text)\")\n}\n```\n\n### Writing a file-based archive\n\n```swift\nlet archive = try ZipArchive(url: archiveURL)\ntry archive.addFile(at: \"hello.txt\", data: Data(\"Hello, Zip!\".utf8))\ntry archive.finalize() // Writes Zip data to disk\n```\n\n## Contributions\n\nContributions are welcome! If you have ideas, suggestions, or bug reports, feel free to open an issue on GitHub. Pull requests are also appreciated.\n\n## License\n\nThis project is licensed under the MIT License. See the LICENSE file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasf%2Fzip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomasf%2Fzip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomasf%2Fzip/lists"}