2.0.0 • Published 3 years ago

@fengweichong/react-native-gzip v2.0.0

Weekly downloads
4
License
MIT
Repository
github
Last release
3 years ago

react-native-gzip

解压缩gzip和tar格式文件

安装

npm install @fengweichong/react-native-gzip --save

ios -> pod install

使用

import Gzip from '@fengweichong/react-native-gzip';

const sourcePath = `${PATH}/xxx.gz`
const targetPath = `${PATH}/xxx`

// 解压缩tar
Gzip.unTar(sourcePath, targetPath, true).then((res)=>{
    console.log(res)
})

// 解压缩gzip
Gzip.unGzip(sourcePath, targetPath, true).then((res)=>{
    console.log(res)
})

// 解压缩gzip和tar
Gzip.unGzipTar(sourcePath, targetPath, true).then((res)=>{
    console.log(res)
})

参数

名称说明会否必须
sourcePath目标文件地址true
targetPath解压目标地址true
force是否覆盖目标地址true
2.0.0

3 years ago

1.1.0-dev-5

4 years ago

1.1.0-dev-4

4 years ago

1.1.0-dev-3

4 years ago

1.1.0-dev-2

4 years ago

1.1.0-dev-1

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago