Refactoring: pass upx_compress_config_t to Packer::compressWithFilters()

so that formats can set conf_lzma.max_num_probs.

Also renamed compression parameters to use cconf & cresult.
This commit is contained in:
Markus F.X.J. Oberhumer
2006-06-29 06:15:28 +02:00
parent c7bf0b6ddd
commit 66df7389d2
14 changed files with 125 additions and 115 deletions
+4 -2
View File
@@ -412,8 +412,10 @@ void PackExe::pack(OutputFile *fo)
ph.u_len = ih_imagesize + relocsize;
// prepare filter
Filter ft(ph.level);
// compress
compressWithFilters(&ft, 32, 0, NULL, 0, MAXMATCH);
// compress (max_match = 8192)
upx_compress_config_t cconf; cconf.reset();
cconf.conf_ucl.max_match = MAXMATCH;
compressWithFilters(&ft, 32, 0, NULL, &cconf);
if (ph.max_run_found + ph.max_match_found > 0x8000)
throwCantPack("decompressor limit exceeded, send a bugreport");