1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-12-22 08:07:18 +00:00

Use fast compression setting

This commit is contained in:
Nikolay Kim 2018-03-21 08:56:21 -07:00 committed by GitHub
parent d5fa0a9418
commit 7bcc258b09
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -420,7 +420,7 @@ impl ContentEncoder {
ContentEncoding::Deflate => ContentEncoder::Deflate(
DeflateEncoder::new(transfer, Compression::fast())),
ContentEncoding::Gzip => ContentEncoder::Gzip(
GzEncoder::new(transfer, Compression::fasr())),
GzEncoder::new(transfer, Compression::fast())),
#[cfg(feature="brotli")]
ContentEncoding::Br => ContentEncoder::Br(
BrotliEncoder::new(transfer, 3)),
@ -471,12 +471,12 @@ impl ContentEncoder {
match encoding {
ContentEncoding::Deflate => ContentEncoder::Deflate(
DeflateEncoder::new(transfer, Compression::default())),
DeflateEncoder::new(transfer, Compression::fast())),
ContentEncoding::Gzip => ContentEncoder::Gzip(
GzEncoder::new(transfer, Compression::default())),
GzEncoder::new(transfer, Compression::fast())),
#[cfg(feature="brotli")]
ContentEncoding::Br => ContentEncoder::Br(
BrotliEncoder::new(transfer, 5)),
BrotliEncoder::new(transfer, 3)),
ContentEncoding::Identity | ContentEncoding::Auto =>
ContentEncoder::Identity(transfer),
}