Versions in this module Expand all Collapse all v0 v0.9.5 Jan 24, 2017 Changes in this version + const ExtWildCard + type Config struct + Level int + RequestFilters []RequestFilter + ResponseFilters []ResponseFilter + type ExtFilter struct + Exts Set + func DefaultExtFilter() ExtFilter + func (e ExtFilter) ShouldCompress(r *http.Request) bool + type Gzip struct + Configs []Config + Next httpserver.Handler + func (g Gzip) ServeHTTP(w http.ResponseWriter, r *http.Request) (int, error) + type LengthFilter int64 + func (l LengthFilter) ShouldCompress(w http.ResponseWriter) bool + type PathFilter struct + IgnoredPaths Set + func (p PathFilter) ShouldCompress(r *http.Request) bool + type RequestFilter interface + ShouldCompress func(*http.Request) bool + type ResponseFilter interface + ShouldCompress func(http.ResponseWriter) bool + type ResponseFilterWriter struct + func NewResponseFilterWriter(filters []ResponseFilter, gz *gzipResponseWriter) *ResponseFilterWriter + func (r *ResponseFilterWriter) Write(b []byte) (int, error) + func (r *ResponseFilterWriter) WriteHeader(code int) + func (w ResponseFilterWriter) CloseNotify() <-chan bool + func (w ResponseFilterWriter) Flush() + func (w ResponseFilterWriter) Hijack() (net.Conn, *bufio.ReadWriter, error) + type Set map[string]struct + func (s Set) Add(value string) + func (s Set) Contains(value string) bool + func (s Set) ContainsFunc(f func(string) bool) bool + func (s Set) Remove(value string) + type SkipCompressedFilter struct + func (n SkipCompressedFilter) ShouldCompress(w http.ResponseWriter) bool