{"id":17346176,"url":"https://github.com/rushiimachine/zip-android","last_synced_at":"2025-07-22T15:09:44.819Z","repository":{"id":135760787,"uuid":"470854317","full_name":"rushiiMachine/zip-android","owner":"rushiiMachine","description":"Native zip library + java interface for android","archived":false,"fork":false,"pushed_at":"2025-07-09T03:00:51.000Z","size":449,"stargazers_count":7,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-19T10:23:53.995Z","etag":null,"topics":["android","java","kotlin","rust","zip"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rushiiMachine.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":"2022-03-17T05:02:05.000Z","updated_at":"2025-07-09T02:57:59.000Z","dependencies_parsed_at":"2025-01-27T19:44:57.240Z","dependency_job_id":"df286c0a-ee61-4594-a8df-a7a9e6298c06","html_url":"https://github.com/rushiiMachine/zip-android","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"purl":"pkg:github/rushiiMachine/zip-android","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushiiMachine%2Fzip-android","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushiiMachine%2Fzip-android/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushiiMachine%2Fzip-android/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushiiMachine%2Fzip-android/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rushiiMachine","download_url":"https://codeload.github.com/rushiiMachine/zip-android/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rushiiMachine%2Fzip-android/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266516475,"owners_count":23941435,"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","status":"online","status_checked_at":"2025-07-22T02:00:09.085Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"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":["android","java","kotlin","rust","zip"],"created_at":"2024-10-15T16:44:45.176Z","updated_at":"2025-07-22T15:09:44.811Z","avatar_url":"https://github.com/rushiiMachine.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# zip-android ![Maven central version](https://img.shields.io/maven-central/v/io.github.diamondminer88/zip-android?style=flat-square)\n\nAndroid JNI bindings for [zip-rs](https://github.com/zip-rs/zip), a native rust zip library.\n\nThis has significant performance improvements compared to similar libraries\nwritten in JVM languages.\n\n### Prerequisites\n\n- Android 5 - 16 (API 21 - 36)\n- `x86`, `x86_64`, `armeabiv7`, `arm64`, `riscv64`\n- 4KiB or 16KiB page alignment\n\n### Installation\n\n```kotlin\nrepositories {\n    mavenCentral()\n}\n\ndependencies {\n    implementation(\"io.github.diamondminer88:zip-android:2.3.1\")\n}\n```\n\n### Example Usage (Kotlin)\n\n```kotlin\n// Open a zip reader from a java.io.File to be read from disk\n// You can autoclose reader/writer by using .use {} (kotlin) or .close()/try block for java\nZipReader(file).use { zip -\u003e\n    \"Entry count: ${zip.entryCount}\"\n    \"Entries: ${zip.entryNames.joinToString()}\"\n\n    // Loop over entries\n    zip.entries().forEach { /* guh */ }\n    zip.forEach {\n        \"Entry: ${it.name} size: ${it.size} modified: ${it.lastModified}\"\n        if (it.isFile) {\n            \"Content: ${it.read().decodeToString()}\"\n        }\n    }\n}\n\n// Open zip reader from an in memory byte array\nZipReader(byteArrayOf(/* ... */)).use { zip -\u003e\n    // Parsed in-memory zip!\n}\n\n// Open a zip writer to the specified java.io.File path and overwrite the original file\n// If you wish to append to an existing zip at that location, set the append parameter to `true`.\nZipWriter(file, /* append = */ false).use { zip -\u003e\n    zip.setComment(\"a comment\".toByteArray())\n    zip.writeEntry(\"compressed.txt\", \"hot garbage\")\n    zip.writeEntry(\"data/compressed_bytes.txt\", bytes)\n    zip.writeDir(\"com/github/diamondminer88/zip\")\n    zip.deleteEntries(\"abc.txt\", \"guh.txt\")\n    zip.deleteEntry(\"husk.txt\")\n\n    // Write page-aligned (4096 byte) uncompressed entry (useful for writing zip aligned .so's)\n    zip.writeEntry(\"lib.so\", bytes, ZipCompression.NONE, 4096)\n    // Delete entry from central dir, preserving alignment for all existing zip entries\n    // If fillVoid is false, then it un-aligns all entries whose data comes after this one\n    zip.deleteEntry(\"lib.so\", /* fillVoid = */ true)\n}\n\n// Start a new in-memory zip file\nval newZipBytes = ZipWriter().use { zip -\u003e\n    // ...\n    zip.toByteArray() // Closes the zip and retrieves the bytes\n}\n\n// Open and append to an existing zip from an in memory byte array\nval modifiedZipBytes = ZipWriter(byteArrayOf(/* ... */)).use { zip -\u003e\n    // ...\n    zip.toByteArray() // Closes the zip and retrieves the modified zip file bytes\n}\n```\n\nThe available compression methods are: `Stored` (none), `Deflate` (default), `Bzip2`, and `Zstd`.\n\n### Building Prerequisites\n\n1. `rustup install nightly \u0026\u0026 rustup default nightly`\n2.\n`rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android`\n3. `cargo install --force cargo-ndk`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frushiimachine%2Fzip-android","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frushiimachine%2Fzip-android","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frushiimachine%2Fzip-android/lists"}