Skip to content

Commit 9c84a22

Browse files
committed
doc: 完善文档
1 parent 5042b2d commit 9c84a22

File tree

1 file changed

+22
-3
lines changed

1 file changed

+22
-3
lines changed

README.md

+22-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
Go中用来解压zip文件的API,优势:
66

7-
- 在原生的zip.File的基础上封账了一些易用API
8-
- 支持并发解压zip文件
7+
- 在原生的zip.File的基础上封装了易用API,一键解压
8+
- 支持并发解压zip文件
99

1010
# 二、安装
1111

@@ -15,7 +15,26 @@ go get -u github.com/compression-algorithm-research-lab/go-unzip
1515

1616
# 三、API示例
1717

18-
TODO
18+
```go
19+
package main
20+
21+
import "github.com/compression-algorithm-research-lab/go-unzip"
22+
23+
func main() {
24+
25+
options := unzip.NewOptions().
26+
SetSourceZipFile("test_data/foo.zip").
27+
SetDestinationDirectory("test_data/foo").
28+
SetWorkerNum(100)
29+
err := unzip.New(options).Unzip()
30+
if err != nil {
31+
panic(err)
32+
}
33+
34+
}
35+
```
36+
37+
1938

2039

2140

0 commit comments

Comments
 (0)