mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 07:53:00 +01:00
Use fast compression setting
This commit is contained in:
parent
d5fa0a9418
commit
7bcc258b09
@ -420,7 +420,7 @@ impl ContentEncoder {
|
|||||||
ContentEncoding::Deflate => ContentEncoder::Deflate(
|
ContentEncoding::Deflate => ContentEncoder::Deflate(
|
||||||
DeflateEncoder::new(transfer, Compression::fast())),
|
DeflateEncoder::new(transfer, Compression::fast())),
|
||||||
ContentEncoding::Gzip => ContentEncoder::Gzip(
|
ContentEncoding::Gzip => ContentEncoder::Gzip(
|
||||||
GzEncoder::new(transfer, Compression::fasr())),
|
GzEncoder::new(transfer, Compression::fast())),
|
||||||
#[cfg(feature="brotli")]
|
#[cfg(feature="brotli")]
|
||||||
ContentEncoding::Br => ContentEncoder::Br(
|
ContentEncoding::Br => ContentEncoder::Br(
|
||||||
BrotliEncoder::new(transfer, 3)),
|
BrotliEncoder::new(transfer, 3)),
|
||||||
@ -471,12 +471,12 @@ impl ContentEncoder {
|
|||||||
|
|
||||||
match encoding {
|
match encoding {
|
||||||
ContentEncoding::Deflate => ContentEncoder::Deflate(
|
ContentEncoding::Deflate => ContentEncoder::Deflate(
|
||||||
DeflateEncoder::new(transfer, Compression::default())),
|
DeflateEncoder::new(transfer, Compression::fast())),
|
||||||
ContentEncoding::Gzip => ContentEncoder::Gzip(
|
ContentEncoding::Gzip => ContentEncoder::Gzip(
|
||||||
GzEncoder::new(transfer, Compression::default())),
|
GzEncoder::new(transfer, Compression::fast())),
|
||||||
#[cfg(feature="brotli")]
|
#[cfg(feature="brotli")]
|
||||||
ContentEncoding::Br => ContentEncoder::Br(
|
ContentEncoding::Br => ContentEncoder::Br(
|
||||||
BrotliEncoder::new(transfer, 5)),
|
BrotliEncoder::new(transfer, 3)),
|
||||||
ContentEncoding::Identity | ContentEncoding::Auto =>
|
ContentEncoding::Identity | ContentEncoding::Auto =>
|
||||||
ContentEncoder::Identity(transfer),
|
ContentEncoder::Identity(transfer),
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user