Skip to content

cozy-labs/react-native-gzip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 52.2%
  • Objective-C 26.6%
  • JavaScript 9.7%
  • Starlark 6.1%
  • Ruby 5.4%