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
+6 -1
View File
@@ -293,7 +293,12 @@ void PackDjgpp2::pack(OutputFile *fo)
ft.buf_len = usize - data->size;
ft.addvalue = text->vaddr - hdrsize;
// compress
compressWithFilters(&ft, 512);
upx_compress_config_t cconf; cconf.reset();
#if 1
// limit stack size needed for runtime decompression
cconf.conf_lzma.max_num_probs = 1846 + (768 << 4); // ~28 kB stack
#endif
compressWithFilters(&ft, 512, 0, NULL, &cconf);
// patch coff header #2
const unsigned lsize = getLoaderSize();