Documentation
¶
Overview ¶
支持gzip zlib zip 解压缩
Index ¶
- func Gzip压缩数据(data []byte, level ...int) ([]byte, error)
- func Gzip解压数据(data []byte) ([]byte, error)
- func Zip压缩到io(压缩包路径 string, writer io.Writer, 路径前缀 ...string) error
- func Zip压缩到文件(压缩包路径, 目标目录 string, 路径前缀 ...string) error
- func Zip解压从数据(data []byte, 目标目录 string, 路径前缀 ...string) error
- func Zip解压从文件(压缩包路径, 目标目录 string, 路径前缀 ...string) error
- func Zlib压缩数据(data []byte) ([]byte, error)
- func Zlib解压数据(data []byte) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Gzip压缩数据 ¶
对数据进行GZIP压缩。 T压缩等级 [-1] 默认压缩等级 [1] 最大压缩速度 [9] 最大压缩尺寸。 1 to 9 which means from none to the best compression.
Note that it returns error if given <level> is invalid.
func Zip压缩到io ¶
ZipPathWriter使用压缩算法将<压缩包路径>压缩到<writer>。 不必要的参数<路径前缀>表示zip文件的路径路径前缀。 注意,参数<压缩包路径>可以是目录或文件,其中 支持用“,”连接多个路径。
func Zip压缩到文件 ¶
ZipPath使用压缩算法将<压缩包路径>压缩到<目标目录>。 不必要的参数<路径前缀>表示zip文件的路径路径前缀。 注意,参数<压缩包路径>可以是目录或文件,其中 支持用“,”连接多个路径。
func Zip解压从数据 ¶
UnZipContent使用压缩算法将<data>解压缩到<目标目录>。 参数<路径前缀>指定<压缩包路径>的解压缩路径, 它可用于指定要解压缩的存档文件的一部分。 注意,参数<目标目录>应该是一个目录。
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.