/compression

Added gzip compression mechanism for response payload.

Primary LanguageGoMIT LicenseMIT

Response Payload Compressor

Added gzip compression mechanism for response payload.

How to use?

var api rest.API

// rest.API pointer
// use value between level -2 to 9 OR gzip constants
h := compression.Handler(&api, gzip.BestCompression)

http.ListenAndServe(":8080", h)