{"id":27076157,"url":"https://github.com/didisouzacosta/uncompress-react-native","last_synced_at":"2025-04-06T00:28:52.426Z","repository":{"id":38426061,"uuid":"359106543","full_name":"didisouzacosta/uncompress-react-native","owner":"didisouzacosta","description":"Simple library to decompress files .zip, .rar, .cbz, .cbr in React Native.","archived":false,"fork":false,"pushed_at":"2023-01-07T06:47:34.000Z","size":40690,"stargazers_count":46,"open_issues_count":30,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-18T15:44:29.856Z","etag":null,"topics":["cbr","cbz","decompress-library","rar","react-native","typescript","zip"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/didisouzacosta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-18T10:04:11.000Z","updated_at":"2024-10-30T08:49:21.000Z","dependencies_parsed_at":"2023-02-06T14:31:47.023Z","dependency_job_id":null,"html_url":"https://github.com/didisouzacosta/uncompress-react-native","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didisouzacosta%2Funcompress-react-native","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didisouzacosta%2Funcompress-react-native/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didisouzacosta%2Funcompress-react-native/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/didisouzacosta%2Funcompress-react-native/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/didisouzacosta","download_url":"https://codeload.github.com/didisouzacosta/uncompress-react-native/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247419635,"owners_count":20936009,"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":["cbr","cbz","decompress-library","rar","react-native","typescript","zip"],"created_at":"2025-04-06T00:28:51.441Z","updated_at":"2025-04-06T00:28:52.415Z","avatar_url":"https://github.com/didisouzacosta.png","language":"Kotlin","funding_links":[],"categories":["Uncategorized","React Native [🔝](#readme)"],"sub_categories":["Uncategorized"],"readme":"# Uncompress React Native\n\n![CI](https://github.com/didisouzacosta/uncompress/workflows/PublishLibrary/badge.svg)\n[![codecov](https://codecov.io/gh/didisouzacosta/uncompress/branch/main/graph/badge.svg?token=WWswGL8bsi)](https://codecov.io/gh/didisouzacosta/uncompress)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](CONTRIBUTING.md)\n\nSimple library to decompress files `.zip`, `.rar`, `.cbz` and `.cbr` in React Native.\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd\u003e\u003cimg src=\"./assets/preview_ios.gif\" height=\"500\" alt=\"Preview iOS\" /\u003e\u003c/td\u003e\n    \u003ctd\u003e\u003cimg src=\"./assets/preview_android.gif\" height=\"500\" alt=\"Preview Android\" /\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n## Installation\n\n```sh\nyarn add uncompress-react-native\n\nor\n\nnpm install uncompress-react-native\n```\n\n## iOS Pods installation\n\nAfter installing the library, you can install pods using the command: `cd ios \u0026\u0026 pod install \u0026\u0026 cd ..`\n\n• If you will have problems with the installation of the dependency `UnrarKit`, you need add in your Podfile `use_frameworks!`\n\n• If you will have problems with `[CP-User] Generate Specs` after add `use_frameworks!`, you can modify your `post_install` to fix.\n\n[The solution discussion reference](https://github.com/facebook/react-native/issues/31034#issuecomment-812564390)\n\n```ruby\npost_install do |installer|\n  react_native_post_install(installer)\n\n  installer.pods_project.targets.each do |target|\n    target.build_configurations.each do |config|\n      config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'\n    end\n\n    if (target.name\u0026.eql?('FBReactNativeSpec'))\n      target.build_phases.each do |build_phase|\n        if (build_phase.respond_to?(:name) \u0026\u0026 build_phase.name.eql?('[CP-User] Generate Specs'))\n          target.build_phases.move(build_phase, 0)\n        end\n      end\n    end\n  end\nend\n```\n\n![](assets/ios_pods_resolve.png)\n\n## Usage\n\n```js\nimport Uncompress from 'uncompress-react-native';\n\n// ...\nawait Uncompress.extract({\n  filePath: 'temp/sample_comic.cbr',\n  destination: 'data/comic',\n});\n// ...\n```\n\n## Extract protected file\n\n```js\n// ...\nawait Uncompress.extract({\n  filePath: 'temp/sample_protected_comic.cbr',\n  destination: 'data/comic',\n  password: '123',\n});\n// ...\n```\n\n## Override files after extraction if successful\n\n```js\n// ...\nawait Uncompress.extract({\n  filePath: 'temp/sample_protected_comic.cbr',\n  destination: 'data/comic',\n  override: true,\n});\n// ...\n```\n\n## Checks whether the file is password protected\n\n```js\n// ...\nconst isProtected = await Uncompress.isProtected({\n  filePath: 'temp/sample_protected_comic.cbr',\n});\n\nconsole.log(isProtected);\n// ...\n```\n\n## Contributing\n\nSee the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.\n\n## Credits\n\n1. [UnrarKit](https://github.com/abbeycode/UnrarKit)\n2. [SSZipArchive](https://github.com/ZipArchive/ZipArchive)\n3. [slf4j](https://github.com/qos-ch/slf4j)\n4. [junrar](https://github.com/junrar/junrar)\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidisouzacosta%2Funcompress-react-native","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdidisouzacosta%2Funcompress-react-native","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdidisouzacosta%2Funcompress-react-native/lists"}