Switch to a faster Brotli crate

This commit is contained in:
Johann Hofmann 2016-07-01 14:48:44 +02:00
parent 0ae07e07e6
commit 7890440d72
No known key found for this signature in database
GPG key ID: 15DD943556C9CC16
4 changed files with 24 additions and 8 deletions

View file

@ -570,7 +570,7 @@ impl StreamedResponse {
Decoder::Deflate(DeflateDecoder::new(response))
}
Some(Encoding::EncodingExt(ref ext)) if ext == "br" => {
Decoder::Brotli(Decompressor::new(response))
Decoder::Brotli(Decompressor::new(response, 1024))
}
_ => {
Decoder::Plain(response)