Skip to content

Commit 0b51bc8

Browse files
committed
perf(server): reduce brotli compression quality to 5
1 parent d1f6b07 commit 0b51bc8

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/server.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,10 @@ fn compress_body(compressor: CompressionType, body_bytes: Vec<u8>) -> Result<Vec
662662
}
663663

664664
CompressionType::Brotli => {
665-
let brotli_params = BrotliEncoderParams::default();
665+
let brotli_params = BrotliEncoderParams {
666+
quality: 5,
667+
..Default::default()
668+
};
666669
let mut compressed = Vec::<u8>::new();
667670
match BrotliCompress(&mut reader, &mut compressed, &brotli_params) {
668671
Ok(_) => compressed,

0 commit comments

Comments
 (0)