All Projects → didisouzacosta → uncompress-react-native

didisouzacosta / uncompress-react-native

Licence: MIT license
Simple library to decompress files .zip, .rar, .cbz, .cbr in React Native.

Programming Languages

kotlin
9241 projects
swift
15916 projects
typescript
32286 projects
java
68154 projects - #9 most used programming language
objective c
16641 projects - #2 most used programming language
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to uncompress-react-native

comi
ComiGO:Simple, cross-platform manga reader。简单、跨平台的漫画阅读器。シンプルな漫画リーダー。
Stars: ✭ 34 (-5.56%)
Mutual labels:  zip, rar, cbr, cbz
MangDL
The most inefficient Manga downloader for PC
Stars: ✭ 40 (+11.11%)
Mutual labels:  zip, rar, cbr, cbz
unarr
A decompression library for rar, tar, zip and 7z archives
Stars: ✭ 35 (-2.78%)
Mutual labels:  zip, rar, cbr, cbz
Koodo Reader
A modern ebook manager and reader with sync and backup capacities for Windows, macOS, Linux and Web
Stars: ✭ 2,938 (+8061.11%)
Mutual labels:  cbr, cbz
lrkFM
Awesome, (ad) free, open source file manager for Android
Stars: ✭ 44 (+22.22%)
Mutual labels:  zip, rar
comic book reader
A browser based touch friendly comic book reader
Stars: ✭ 20 (-44.44%)
Mutual labels:  cbr, cbz
kthoom
Comic Book Reader in the Browser
Stars: ✭ 97 (+169.44%)
Mutual labels:  cbr, cbz
ratarmount
Random Access Read-Only Tar Mount
Stars: ✭ 217 (+502.78%)
Mutual labels:  zip, rar
uncompress.js
Uncompress ZIP, RAR, and TAR files with pure JavaScript
Stars: ✭ 79 (+119.44%)
Mutual labels:  zip, rar
Libarchive
Multi-format archive and compression library
Stars: ✭ 1,625 (+4413.89%)
Mutual labels:  zip, rar
extractor
Compressed files extractor for PHP
Stars: ✭ 23 (-36.11%)
Mutual labels:  zip, rar
Archiver
Easily create & extract archives, and compress & decompress files of various formats
Stars: ✭ 3,373 (+9269.44%)
Mutual labels:  zip, rar
Ob3vil1on
Another archive cracker created in python | cracking [zip/7z/rar] by bruteforcing [ NOT MAINTAINED ]
Stars: ✭ 17 (-52.78%)
Mutual labels:  zip, rar
cbwebreader
Web Based CBR, CBZ and PDF file reader.
Stars: ✭ 31 (-13.89%)
Mutual labels:  cbr, cbz
cordova-plugin-zeep
Zip compression/decompression for the cordova/phonegap platform
Stars: ✭ 27 (-25%)
Mutual labels:  zip
zipstream
A command line tool that allows you to easily share files and directories over the network
Stars: ✭ 49 (+36.11%)
Mutual labels:  zip
zipit
Decentralized or self-hosted encryption archives that work on any internet device.
Stars: ✭ 14 (-61.11%)
Mutual labels:  zip
go-toolkit
Official repo for all things written in Go related to the Readium Architecture
Stars: ✭ 21 (-41.67%)
Mutual labels:  cbz
MangaReaderScraper
Search and download mangas from the command line
Stars: ✭ 23 (-36.11%)
Mutual labels:  cbz
vim-rzip
Extends zip.vim to browse and write nested zip files
Stars: ✭ 22 (-38.89%)
Mutual labels:  zip

Uncompress React Native

CI codecov License: MIT contributions welcome

Simple library to decompress files .zip, .rar, .cbz and .cbr in React Native.

Preview iOS Preview Android

Installation

yarn add uncompress-react-native

or

npm install uncompress-react-native

iOS Pods installation

After installing the library, you can install pods using the command: cd ios && pod install && cd ..

• If you will have problems with the installation of the dependency UnrarKit, you need add in your Podfile use_frameworks!

• If you will have problems with [CP-User] Generate Specs after add use_frameworks!, you can modify your post_install to fix.

The solution discussion reference

post_install do |installer|
  react_native_post_install(installer)

  installer.pods_project.targets.each do |target|
    target.build_configurations.each do |config|
      config.build_settings['BUILD_LIBRARY_FOR_DISTRIBUTION'] = 'YES'
    end

    if (target.name&.eql?('FBReactNativeSpec'))
      target.build_phases.each do |build_phase|
        if (build_phase.respond_to?(:name) && build_phase.name.eql?('[CP-User] Generate Specs'))
          target.build_phases.move(build_phase, 0)
        end
      end
    end
  end
end

Usage

import Uncompress from 'uncompress-react-native';

// ...
await Uncompress.extract({
  filePath: 'temp/sample_comic.cbr',
  destination: 'data/comic',
});
// ...

Extract protected file

// ...
await Uncompress.extract({
  filePath: 'temp/sample_protected_comic.cbr',
  destination: 'data/comic',
  password: '123',
});
// ...

Override files after extraction if successful

// ...
await Uncompress.extract({
  filePath: 'temp/sample_protected_comic.cbr',
  destination: 'data/comic',
  override: true,
});
// ...

Checks whether the file is password protected

// ...
const isProtected = await Uncompress.isProtected({
  filePath: 'temp/sample_protected_comic.cbr',
});

console.log(isProtected);
// ...

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

Credits

  1. UnrarKit
  2. SSZipArchive
  3. slf4j
  4. junrar

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].