Skip to content

A react native lib using rust to create and extract tar.gz files

License

Notifications You must be signed in to change notification settings

danielmbomfim/react-native-tar-gz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A react native lib using rust to create and extract tar.gz files

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published