acceptencoder

package
v1.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitGzip

func InitGzip(minLength, compressLevel int, methods []string)

func ParseEncoding

func ParseEncoding(r *http.Request) string

ParseEncoding will extract the right encoding for response the Accept-Encoding's sec is here: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.3

func WriteBody

func WriteBody(encoding string, writer io.Writer, content []byte) (bool, string, error)

WriteBody reads writes content to writer by the specific encoding(gzip/deflate)

func WriteFile

func WriteFile(encoding string, writer io.Writer, file http.File) (bool, string, error)

WriteFile reads from file and writes to writer by the specific encoding(gzip/deflate)

Types

This section is empty.

Jump to

Keyboard shortcuts

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