mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 09:31:22 -05:00
fix(ext/http): serveHttp brotli compression level should be fastest (#20058)
Use brotli's fastest mode rather than default mode
This commit is contained in:
parent
72d9f06090
commit
8ae7062931
1 changed files with 3 additions and 1 deletions
|
@ -743,7 +743,9 @@ fn http_response(
|
|||
let (reader, _) = tokio::io::split(a);
|
||||
let (_, writer) = tokio::io::split(b);
|
||||
let writer: Pin<Box<dyn tokio::io::AsyncWrite>> = match encoding {
|
||||
Encoding::Brotli => Box::pin(BrotliEncoder::new(writer)),
|
||||
Encoding::Brotli => {
|
||||
Box::pin(BrotliEncoder::with_quality(writer, Level::Fastest))
|
||||
}
|
||||
Encoding::Gzip => Box::pin(GzipEncoder::with_quality(
|
||||
writer,
|
||||
Level::Precise(GZIP_DEFAULT_COMPRESSION_LEVEL.into()),
|
||||
|
|
Loading…
Add table
Reference in a new issue