Documentation ¶
Index ¶
- Constants
- func AcceptEncoding(from string, to string) (choose string, err error)
- func AcceptEncodingWriter(w http.ResponseWriter, r *http.Request) io.WriteCloser
- func ContentEncodingReadAll(resp *http.Response) ([]byte, error)
- func ContentEncodingReader(resp *http.Response) (r io.Reader, err error)
- func IsSupported(name string) bool
- func NewReader(enc string, r io.Reader) (io.ReadCloser, error)
- func NewWriter(enc string, w io.Writer) (out io.WriteCloser, err error)
- func RegisterEncoding(name string, c *Encoding)
- func Transfer(from string, in io.Reader, to string, out io.Writer) (int64, error)
- func TransferBytes(from string, in []byte, to string) ([]byte, error)
- type Encoding
Constants ¶
View Source
const ( EncodingZstd = "zstd" EncodingIdentity = "identity" EncodingDeflate = "deflate" EncodingGzip = "gzip" EncodingBrotli = "br" )
Variables ¶
This section is empty.
Functions ¶
func AcceptEncodingWriter ¶
func AcceptEncodingWriter(w http.ResponseWriter, r *http.Request) io.WriteCloser
AcceptEncodingWriter will handle request Accept-Encoding header, set corresponding Content-Encoding header. Caller must call Close() on the returned writer to flush the data.
func ContentEncodingReader ¶
func IsSupported ¶
func RegisterEncoding ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.