compresshttp

package
v8.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	EncodingIdentity = "identity"
	EncodingGzip     = "gzip"
	EncodingSnappy   = "x-snappy-framed"

	AcceptedEncodings = EncodingSnappy + ", " + EncodingGzip
)

Variables

View Source
var ErrUnacceptableEncoding = errors.New("unknown Content-Encoding")

Functions

func CompressRequest

func CompressRequest(request *http.Request, acceptEncoding string) error

func CompressResponse

func CompressResponse(r io.Reader, acceptEncoding string, writer http.ResponseWriter, status int) error

func DecompressRequest

func DecompressRequest(request *http.Request) error

func DecompressResponse

func DecompressResponse(response *http.Response) error

func Middleware

func Middleware(next http.Handler) http.Handler

Types

This section is empty.

Jump to

Keyboard shortcuts

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