react-native-tar-gz
v1.1.0
Published
A react native package for compressing and extracting tar.gz files
Downloads
3
Maintainers
Readme
react-native-tar-gz
A react native lib using rust for compressing and extracting tar.gz files.
Requirements
This library uses the new architecture and as a project must have it enabled to use it. How to enable the new architecture.
Installation
As this lib uses rust, you must have it installed before building your app.
Android
rustup target add aarch64-linux-android armv7-linux-androideabi x86_64-linux-android i686-linux-android
npm install react-native-tar-gz
Ios
rustup target add aarch64-apple-ios x86_64-apple-ios
cargo install cargo-lipo
npm install react-native-tar-gz
Windows
npm install react-native-tar-gz
Usage
import { compress, uncompress } from 'react-native-tar-gz';
try {
await compress(
'<full-path>/source-folder',
'<full-path>/archive.tar.gz'
);
} catch(error) {
console.error(error);
}
try {
await uncompress(
'<full-path>/archive.tar.gz',
'<full-path>/destination-folder'
);
} catch(error) {
console.error(error);
}
Contributing
See the contributing guide to learn how to contribute to the repository and the development workflow.
License
MIT
Made with create-react-native-library