🗜️ trillium-compression — response body compression
Transparent response body compression for trillium. Supports zstd, brotli, and gzip (in that
preference order). The algorithm is selected based on the client's Accept-Encoding header;
downstream handlers need no modification.
Example
use Compression;
let app = ;
// run with your chosen runtime adapter, e.g.:
// trillium_tokio::run(app);
The set of supported algorithms can be restricted if needed:
use ;
let app = ;
Safety
This crate uses #![forbid(unsafe_code)].