mirror of
https://github.com/servo/servo.git
synced 2025-09-30 16:49:16 +01:00
Switch to a faster Brotli crate
This commit is contained in:
parent
0ae07e07e6
commit
7890440d72
4 changed files with 24 additions and 8 deletions
|
@ -10,7 +10,7 @@ path = "lib.rs"
|
|||
|
||||
[dependencies]
|
||||
bitflags = "0.7"
|
||||
brotli = {git = "https://github.com/ende76/brotli-rs"}
|
||||
brotli = "1.0.6"
|
||||
content-blocker = "0.2"
|
||||
cookie = { version = "0.2.5", features = ["serialize-serde", "serialize-rustc" ] }
|
||||
device = {git = "https://github.com/servo/devices"}
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue