Documentation ¶
Overview ¶
author: linhuadong(scathonlin) creatdate: 2020/12/06
description: tools to compress or uncompress archived file such as gzip, tar, zip. author: linhuadong(scathonlin) date: 2020-12-2 21:44
Index ¶
- func GUnzip(gzipFilePath, gUnzipDir string) error
- func Gzip(filePath, gzipFilePath string) error
- func TarDir(dirToTar, tarFilePath string) (err error)
- func TarFiles(filePaths []string, tarFilePath string) error
- func UnTar(tarFilePath, unTarDir string) error
- func UnTarGZ(tarGzFilePath, unTarGzDir string) error
- func UnZip(zipFilePath, unZipDir string, maxEntries, limitSize int) error
- func ZipDir(dirToZip, zipFilePath string) error
- func ZipFiles(filePaths []string, zipFilePath string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GUnzip ¶
GUnzip can be used to uncompress gzip file with given gzip file path and target uncompress file.
func UnZip ¶
UnZip can be used to uncompress zip file. 1. maxEntries is be used to symbol the max entry num in the zip file which is counted during unzip procedure, 2. limitSize is be used to symbol the total size of unzip file which is calculated during unzip procedure. the purpose of limitSize and maxEntries is to protect the program from high compression radio file and zip bomb attacks.
Types ¶
This section is empty.