Skip to content

hummingbird-project/hummingbird-compression

Repository files navigation

Hummingbird Compression

Adds request decompression and response compression to Hummingbird

Usage

let router = Router()
router.middlewares.add(RequestDecompressionMiddleware())
router.middlewares.add(ResponseCompressionMiddleware(minimumResponseSizeToCompress: 512))

Adding request decompression middleware means when a request comes in with header content-encoding set to gzip or deflate the server will attempt to decompress the request body. Adding response compression means when a request comes in with header accept-encoding set to gzip or deflate the server will compression the response body.

About

Compression support for Hummingbird server framework

Resources

License

Code of conduct

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •