From d2de4e3eab69585e346672a49c037e71b9382b45 Mon Sep 17 00:00:00 2001 From: Jose Fonseca Date: Tue, 29 Mar 2016 12:12:22 +0100 Subject: cli: Change default Brotli compression params. --- cli/cli_repack.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'cli') diff --git a/cli/cli_repack.cpp b/cli/cli_repack.cpp index 6411ac1c..e259661d 100644 --- a/cli/cli_repack.cpp +++ b/cli/cli_repack.cpp @@ -128,6 +128,19 @@ repack_brotli(trace::File *inFile, const char *outFileName, int quality) { brotli::BrotliParams params; + // Brotli default quality is 11, but there are problems using quality + // higher than 9: + // + // - Some traces cause compression to be extremely slow. Possibly the same + // issue as https://github.com/google/brotli/issues/330 + // - Some traces get lower compression ratio with 11 than 9. Possibly the + // same issue as https://github.com/google/brotli/issues/222 + params.quality = 9; + + // The larger the window, the higher the compression ratio and + // decompression speeds, so choose the maximum. + params.lgwin = 24; + if (quality > 0) { params.quality = quality; } -- cgit v1.2.3