From 9c84a225001d72581bb5070f9485fce9282bbe51 Mon Sep 17 00:00:00 2001 From: cc11001100 Date: Mon, 11 Dec 2023 23:59:51 +0800 Subject: [PATCH] =?UTF-8?q?doc:=20=E5=AE=8C=E5=96=84=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index eb657bc..ecf2f46 100644 --- a/README.md +++ b/README.md @@ -4,8 +4,8 @@ Go中用来解压zip文件的API,优势: -- 在原生的zip.File的基础上封账了一些易用API -- 支持并发解压zip文件 +- 在原生的zip.File的基础上封装了易用API,一键解压 +- 支持并发解压zip文件 # 二、安装 @@ -15,7 +15,26 @@ go get -u github.com/compression-algorithm-research-lab/go-unzip # 三、API示例 -TODO +```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) + } + +} +``` + +