hummingbird-compression

0.5.0

Compression support for Hummingbird server framework
hummingbird-project/hummingbird-compression

What's New

v0.5.0

2021-09-21T09:46:17Z

Update to hummingbird v0.13.0
Fix up after changes to hummingbird symbol exports

Hummingbird Compression

Adds request decompression and response compression to Hummingbird

Usage

let app = HBApplication()
// run response compression on application thread pool when buffer is 
// larger than 32768 bytes otherwise run it on the eventloop
app.addResponseCompression(execute: .onThreadPool(threshold: 32768))
// run request decompression on eventloop with no limit to the size
// of data that can be decompressed
app.addRequestDecompression(execute: .onEventLoop, limit: .none)

Adding request decompression 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.

Description

  • Swift Tools 5.3.0
View More Packages from this Author

Dependencies

Last updated: Tue Oct 04 2022 03:47:38 GMT-0500 (GMT-05:00)