vRp.CD2g_test/utils/compress/README.md

2.2 KiB
Raw Blame History

Compress

Go doc

compress 提供了一些用于压缩和解压缩数据的函数。

目录导航

列出了该 package 下所有的函数及类型定义,可通过目录导航进行快捷跳转 ❤️

展开 / 折叠目录导航

包级函数定义

函数名称 描述
GZipCompress 对数据进行GZip压缩返回bytes.Buffer和错误信息
GZipUnCompress 对已进行GZip压缩的数据进行解压缩返回字节数组及错误信息
TARCompress 对数据进行TAR压缩返回bytes.Buffer和错误信息
TARUnCompress 对已进行TAR压缩的数据进行解压缩返回字节数组及错误信息
ZIPCompress 对数据进行ZIP压缩返回bytes.Buffer和错误信息
ZIPUnCompress 对已进行ZIP压缩的数据进行解压缩返回字节数组及错误信息

详情信息

func GZipCompress(data []byte) (bytes.Buffer, error)

对数据进行GZip压缩返回bytes.Buffer和错误信息


func GZipUnCompress(dataByte []byte) ([]byte, error)

对已进行GZip压缩的数据进行解压缩返回字节数组及错误信息


func TARCompress(data []byte) (bytes.Buffer, error)

对数据进行TAR压缩返回bytes.Buffer和错误信息


func TARUnCompress(dataByte []byte) ([]byte, error)

对已进行TAR压缩的数据进行解压缩返回字节数组及错误信息


func ZIPCompress(data []byte) (bytes.Buffer, error)

对数据进行ZIP压缩返回bytes.Buffer和错误信息


func ZIPUnCompress(dataByte []byte) ([]byte, error)

对已进行ZIP压缩的数据进行解压缩返回字节数组及错误信息