Documentation
¶
Index ¶
- Constants
- func BrZip(data []byte, quality int) ([]byte, error)
- func BrZipFile(src, dst string, quality int) error
- func CompressHandler(w http.ResponseWriter, r *http.Request, compressMethod string, ...) (bool, []byte, error)
- func GZip(data []byte) ([]byte, error)
- func GZipFile(src, dst string) error
- func UnBrZip(compressedData []byte) ([]byte, error)
- func UnBrZipFile(src, dst string) error
- func UnGZip(compressedData []byte) ([]byte, error)
- func UnGZipFile(src, dst string) error
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 CompressHandler ¶ added in v1.2.201
func CompressHandler(w http.ResponseWriter, r *http.Request, compressMethod string, compressType string) (bool, []byte, error)
压缩 和 解压逻辑
func UnBrZipFile ¶ added in v1.2.200
func UnGZipFile ¶ added in v1.2.200
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.