gozip

package
v1.2.201 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XNlContentEncoding = "X-NL-Content-Encoding" //默认Header 压缩标识
	GZIP               = "gzip"
	BR                 = "br"
	GoZipType          = "__zip__"   //默认Header 压缩标识
	UnGoZipType        = "__unzip__" //默认Header 压缩标识
)

xNlContentEncoding: br, gzip

Variables

This section is empty.

Functions

func BrZip added in v1.2.200

func BrZip(data []byte, quality int) ([]byte, error)

BR 压缩 压缩数据

func BrZipFile added in v1.2.200

func BrZipFile(src, dst string, quality int) error

func CompressHandler added in v1.2.201

func CompressHandler(w http.ResponseWriter, r *http.Request, compressMethod string, compressType string) (bool, []byte, error)

压缩 和 解压逻辑

func GZip added in v1.2.199

func GZip(data []byte) ([]byte, error)

func GZipFile added in v1.2.200

func GZipFile(src, dst string) error

func UnBrZip added in v1.2.200

func UnBrZip(compressedData []byte) ([]byte, error)

解压数据

func UnBrZipFile added in v1.2.200

func UnBrZipFile(src, dst string) error

func UnGZip added in v1.2.200

func UnGZip(compressedData []byte) ([]byte, error)

func UnGZipFile added in v1.2.200

func UnGZipFile(src, dst string) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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