pub fn brotli() -> Compression<impl Fn(CompressionProps) -> Response + Copy>
Expand description

Create a wrapping filter that compresses the Body of a Response using brotli, adding content-encoding: br to the Response’s HeaderMap

Example

use warp::Filter;

let route = warp::get()
    .and(warp::path::end())
    .and(warp::fs::file("./README.md"))
    .with(warp::compression::brotli());