https://github.com/compression-algorithm-research-lab/go-unzip
Go中解压zip文件
https://github.com/compression-algorithm-research-lab/go-unzip
Last synced: 4 months ago
JSON representation
Go中解压zip文件
- Host: GitHub
- URL: https://github.com/compression-algorithm-research-lab/go-unzip
- Owner: compression-algorithm-research-lab
- License: mit
- Created: 2023-06-02T03:48:28.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-12-11T16:01:11.000Z (over 2 years ago)
- Last Synced: 2023-12-12T17:54:24.854Z (over 2 years ago)
- Language: Go
- Size: 12.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# go-unzip
# 一、这是什么?优势是什么?
Go中用来解压zip文件的API,优势:
- 在原生的zip.File的基础上封装了易用API,一键解压
- 支持并发解压zip文件
# 二、安装
```bash
go get -u github.com/compression-algorithm-research-lab/go-unzip
```
# 三、API示例
```go
package main
import "github.com/compression-algorithm-research-lab/go-unzip"
func main() {
options := unzip.NewOptions().
SetSourceZipFile("test_data/foo.zip").
SetDestinationDirectory("test_data/foo").
SetWorkerNum(100)
err := unzip.New(options).Unzip()
if err != nil {
panic(err)
}
}
```