Skip to content

ntnext/react-native-gzip

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 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

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Objective-C 82.1%
  • Java 9.7%
  • Ruby 4.7%
  • JavaScript 2.1%
  • Starlark 1.4%