Skip to content

Commit

Permalink
Comments
Browse files Browse the repository at this point in the history
  • Loading branch information
adam-fowler committed Jun 15, 2024
1 parent 24ca060 commit baab2c0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ import CompressNIO
import Hummingbird
import Logging

/// Middleware for decompressing request bodies
///
/// if the content-encoding header is set to gzip or deflate then the middleware will attempt
/// to decompress the contents of the request body and pass that down the middleware chain.
public struct RequestDecompressionMiddleware<Context: RequestContext>: RouterMiddleware {
/// decompression window size
let windowSize: Int
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ import CompressNIO
import Hummingbird
import Logging

/// Middleware for compressing response bodies
///
/// If the accept-encoding header in request is set to gzip or deflate and the response body
/// is of at least a minimum size then the middleware will return a response with a compressed
/// version of the response body that it received.
public struct ResponseCompressionMiddleware<Context: RequestContext>: RouterMiddleware {
/// compression window size
let windowSize: Int
Expand Down

0 comments on commit baab2c0

Please sign in to comment.