diff options
author | Jose Fonseca <jfonseca@vmware.com> | 2016-03-29 12:12:22 +0100 |
---|---|---|
committer | Jose Fonseca <jfonseca@vmware.com> | 2016-03-29 12:15:21 +0100 |
commit | d2de4e3eab69585e346672a49c037e71b9382b45 (patch) | |
tree | 0f8799aed47ae9dd57ccee53d178fdeb9754a3e8 /cli | |
parent | 50d5e20cd3a37f4871780aebf0129f1cd549b444 (diff) |
cli: Change default Brotli compression params.
Diffstat (limited to 'cli')
-rw-r--r-- | cli/cli_repack.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
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; } |