os

package
v1.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

支持gzip zlib zip 解压缩

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Gzip压缩数据

func Gzip压缩数据(data []byte, level ...int) ([]byte, error)

对数据进行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 Gzip解压数据

func Gzip解压数据(data []byte) ([]byte, error)

对数据进行GZIP解压。

func Zip压缩到io

func Zip压缩到io(压缩包路径 string, writer io.Writer, 路径前缀 ...string) error

ZipPathWriter使用压缩算法将<压缩包路径>压缩到<writer>。 不必要的参数<路径前缀>表示zip文件的路径路径前缀。 注意,参数<压缩包路径>可以是目录或文件,其中 支持用“,”连接多个路径。

func Zip压缩到文件

func Zip压缩到文件(压缩包路径, 目标目录 string, 路径前缀 ...string) error

ZipPath使用压缩算法将<压缩包路径>压缩到<目标目录>。 不必要的参数<路径前缀>表示zip文件的路径路径前缀。 注意,参数<压缩包路径>可以是目录或文件,其中 支持用“,”连接多个路径。

func Zip解压从数据

func Zip解压从数据(data []byte, 目标目录 string, 路径前缀 ...string) error

UnZipContent使用压缩算法将<data>解压缩到<目标目录>。 参数<路径前缀>指定<压缩包路径>的解压缩路径, 它可用于指定要解压缩的存档文件的一部分。 注意,参数<目标目录>应该是一个目录。

func Zip解压从文件

func Zip解压从文件(压缩包路径, 目标目录 string, 路径前缀 ...string) error

UnZipFile使用压缩算法将<压缩包路径>解压缩到<目标目录>。 参数<路径前缀>指定<压缩包路径>的解压缩路径, 它可用于指定要解压缩的存档文件的一部分。 注意,参数<目标目录>应该是一个目录。

func Zlib压缩数据

func Zlib压缩数据(data []byte) ([]byte, error)

使用zlib算法保持压缩data

func Zlib解压数据

func Zlib解压数据(data []byte) ([]byte, error)

使用zlib算法解压缩<data>。

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL