Rocket Async Compression
This library provides response compression in both gzip and brotli formats for the Rocket using the async-compression
library.
It currently supports usage with Rocket 0.5.0-rc.1
. If you want to use a different version, you'll have to fork this library and change Cargo.toml
.
I'd love to get this merged into Rocket itself eventually since I think it would be a very useful addition that I myself can barely live without in a webserver.
Installation
Add this to Cargo.toml
:
[]
= "0.5.0-rc.1"
= "0.1.0"
Usage
The following example will enable compression on releases cause localhost isn't on a remote network (usually)
use Compression;
async
Contirbutors
- Casey Primozic (Ameobea)
- Christof Weickhardt (somehowchris)