{"id":27153510,"url":"https://github.com/jojo4gh/kzip","last_synced_at":"2026-04-29T01:33:49.967Z","repository":{"id":283912363,"uuid":"866263007","full_name":"Jojo4GH/kzip","owner":"Jojo4GH","description":"Kotlin Multiplatform ZIP library","archived":false,"fork":false,"pushed_at":"2025-12-22T01:11:37.000Z","size":445,"stargazers_count":14,"open_issues_count":1,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-23T07:35:58.998Z","etag":null,"topics":["io","kotlin","kotlin-library","kotlin-multiplatform","zip"],"latest_commit_sha":null,"homepage":"","language":"C++","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/Jojo4GH.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-10-01T23:47:14.000Z","updated_at":"2025-12-22T01:37:58.000Z","dependencies_parsed_at":"2025-03-23T01:27:32.827Z","dependency_job_id":"27aea68b-2979-4eaf-afa3-fb7f13792113","html_url":"https://github.com/Jojo4GH/kzip","commit_stats":null,"previous_names":["jojo4gh/kzip"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/Jojo4GH/kzip","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jojo4GH%2Fkzip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jojo4GH%2Fkzip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jojo4GH%2Fkzip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jojo4GH%2Fkzip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Jojo4GH","download_url":"https://codeload.github.com/Jojo4GH/kzip/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Jojo4GH%2Fkzip/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32407164,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["io","kotlin","kotlin-library","kotlin-multiplatform","zip"],"created_at":"2025-04-08T16:17:26.800Z","updated_at":"2026-04-29T01:33:49.954Z","avatar_url":"https://github.com/Jojo4GH.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Kzip\n\n[![Maven Central][kzip-maven-badge]][kzip-maven]\n[![GitHub][kzip-license-badge]](LICENSE)\n\n[![Kotlin Multiplatform][kotlin-multiplatform-badge]][kotlin-multiplatform]\n[![JVM Platform][jvm-platform-badge]][kotlin-jvm]\n[![Linux X64 Platform][linux-x64-platform-badge]][kotlin-native]\n[![Linux ARM64 Platform][linux-arm64-platform-badge]][kotlin-native]\n[![MinGW X64 Platform][mingw-x64-platform-badge]][kotlin-native]\n[![Android X64 Platform][android-x64-platform-badge]][kotlin-native]\n[![Android ARM64 Platform][android-arm64-platform-badge]][kotlin-native]\n\n[kzip-maven-badge]: https://img.shields.io/maven-central/v/de.jonasbroeckmann.kzip/kzip?label=Latest\n[kzip-license-badge]: https://img.shields.io/github/license/Jojo4GH/kzip?cacheSeconds=3600\n[kotlin-multiplatform-badge]: https://img.shields.io/badge/Kotlin_Multiplatform-grey?logo=kotlin\n[jvm-platform-badge]: https://img.shields.io/badge/Platform-JVM-4dbb5f\n[linux-x64-platform-badge]: https://img.shields.io/badge/Native-Linux_X64-e082f3\n[linux-arm64-platform-badge]: https://img.shields.io/badge/Native-Linux_ARM64-e082f3\n[mingw-x64-platform-badge]: https://img.shields.io/badge/Native-MinGW_X64-e082f3\n[android-x64-platform-badge]: https://img.shields.io/badge/Native-Android_X64-e082f3\n[android-arm64-platform-badge]: https://img.shields.io/badge/Native-Android_ARM64-e082f3\n\n[kzip-maven]: https://central.sonatype.com/artifact/de.jonasbroeckmann.kzip/kzip\n[kotlin-multiplatform]: https://kotlinlang.org/docs/multiplatform.html\n[kotlin-native]: https://kotlinlang.org/docs/native-overview.html\n[kotlin-jvm]: https://kotlinlang.org/docs/jvm-get-started.html\n\nA lightweight Kotlin Multiplatform library for reading, writing and modifying ZIP files.\n\n## ⭐️ Main Features\n\n- 🗂️ **Reading** ZIP entries and metadata\n- 🗜️ Easy **extraction** and **compression** of files and directories\n- 📝 **Modifying** existing ZIP files\n\nThe kotlin file I/O interface uses [kotlinx-io](https://github.com/Kotlin/kotlinx-io) making it compatible with other Kotlin Multiplatform libraries.\nThe JVM implementation uses the standard `java.util.zip` while the current native implementation uses the lightweight [kuba--/zip](https://github.com/kuba--/zip).\n\nCurrently kzip supports the following targets:\n\n- `jvm`\n- `linuxX64`\n- `linuxArm64`\n- `mingwX64`\n- `androidNativeX64`\n- `androidNativeArm64`\n- `macosX64`\n- `macosArm64`\n\nBut the following targets are planned (mostly only requiring testing):\n\n- Other Apple targets\n\nMore features are planned including support for suspending functions, more access to metadata, more utilities and integrations into other KMP libraries (see also [Contributing](#-contributing)).\n\n## 🛠️ Installation\n\nThe kzip dependency is available on Maven Central and can be added to your common source set.\nJust replace `$kzipVersion` with the [latest version](#kzip).\n\n\u003cdetails open\u003e\n\u003csummary\u003eGradle - Kotlin DSL\u003c/summary\u003e\n\n```kotlin\nimplementation(\"de.jonasbroeckmann.kzip:kzip:$kzipVersion\")\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eGradle - Groovy DSL\u003c/summary\u003e\n\n```groovy\nimplementation \"de.jonasbroeckmann.kzip:kzip:$kzipVersion\"\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eMaven\u003c/summary\u003e\n\n```xml\n\u003cdependencies\u003e\n    \u003cdependency\u003e\n        \u003cgroupId\u003ede.jonasbroeckmann.kzip\u003c/groupId\u003e\n        \u003cartifactId\u003ekzip\u003c/artifactId\u003e\n        \u003cversion\u003e$kzipVersion\u003c/version\u003e\n    \u003c/dependency\u003e\n\u003c/dependencies\u003e\n```\n\u003c/details\u003e\n\n## 🚀 Usage\n\n### Reading a ZIP file\n\n```kotlin\nval zip = Zip.open(Path(\"example.zip\"))\n\n// Access a specific entry\nzip.entry(Path(\"content.txt\")) {\n    println(\"Entry content.txt has size $uncompressedSize\")\n    println(\"Entry content.txt has content:\")\n    println(readToSource().readString())\n}\n\n// Access all entries\nzip.forEachEntry { entry -\u003e\n    println(\"Entry ${entry.path} has size ${entry.uncompressedSize}\")\n\n    if (entry.isDirectory) {\n        println(\"Entry is a directory\")\n    } else {\n        println(\"Entry is a file with content:\")\n        println(entry.readToSource().readString())\n    }\n}\n\nzip.close()\n```\n\n### Extracting a ZIP file\n\n```kotlin\nZip.open(Path(\"example.zip\")).use { zip -\u003e\n    zip.extractTo(Path(\"example\"))\n}\n```\n\n### Creating a ZIP file from a directory\n\n```kotlin\nZip.open(\n    path = Path(\"example.zip\"),\n    mode = Zip.Mode.Write,\n    // Optional: Set compression level\n    level = Zip.CompressionLevel.BetterCompression\n).use { zip -\u003e\n    zip.compressFrom(Path(\"example\"))\n}\n```\n\n### Modifying a ZIP file\n\n```kotlin\nval textSource = Buffer().apply { writeString(\"Hello, World!\") }\nZip.open(Path(\"example.zip\"), mode = Zip.Mode.Append).use { zip -\u003e\n    // Add a folder\n    zip.folderEntry(Path(\"subfolder\"))\n    // Add a file from a path\n    zip.entryFromPath(Path(\"compressed.txt\"), Path(\"example.txt\"))\n    // Add a file from a source\n    zip.entryFromSource(Path(\"hello_world.txt\"), textSource)\n}\ntextSource.close()\n```\n\n## 🚧 Contributing\n\nIf you have any ideas, feel free to open an issue or create a pull request.\n\n## 📄 License\n\nThis project is licensed under the [MIT License](LICENSE).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjojo4gh%2Fkzip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjojo4gh%2Fkzip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjojo4gh%2Fkzip/lists"}