| Copyright | Michael Snoyman |
|---|---|
| License | BSD3 |
| Maintainer | Michael Snoyman <michael@snoyman.com> |
| Stability | Unstable |
| Portability | portable |
| Safe Haskell | None |
| Language | Haskell98 |
Network.Wai.Middleware.Gzip
Description
Automatic gzip compression of responses.
- gzip :: GzipSettings -> Middleware
- data GzipSettings
- gzipFiles :: GzipSettings -> GzipFiles
- data GzipFiles
- gzipCheckMime :: GzipSettings -> ByteString -> Bool
- def :: Default a => a
- defaultCheckMime :: ByteString -> Bool
Documentation
gzip :: GzipSettings -> Middleware Source
Use gzip to compress the body of the response.
Analyzes the "Accept-Encoding" header from the client to determine if gzip is supported.
Possible future enhancements:
- Only compress if the response is above a certain size.
data GzipSettings Source
Instances
gzipFiles :: GzipSettings -> GzipFiles Source
Constructors
| GzipIgnore | |
| GzipCompress | |
| GzipCacheFolder FilePath |
gzipCheckMime :: GzipSettings -> ByteString -> Bool Source
defaultCheckMime :: ByteString -> Bool Source