Skip to content

What we pass to LZMA Backend

Peter Hyman edited this page Mar 4, 2021 · 2 revisions

LZMA gets Level, Dic Size

A change from the original is that

  • LZMA gets an absolute level
  • LZMA gets an absolute dictionary size
  • LZMA gets to compute whether to operate in multi or single thread mode.

By passing -1, LZMA sets defaults. LZMA will look at threads and tell if it has multiple processors/cores to work with. This enhances the functionality of lrzip-next by further leveraging threads.

from stream.c

 327         /* pass absolute dictionary size and compression level */
 328         lzma_ret = LzmaCompress(c_buf, &dlen, cthread->s_buf,
 329                 (size_t)cthread->s_len, lzma_properties, &prop_size,
 330                                 control->compression_level,
 331                                 control->dictSize, /* dict size. 0 = set default, otherwise control->dictSize */
 332                                 -1, -1, -1, -1, /* lc, lp, pb, fb */
 333                                 -1);
 334                                 /* LZMA spec has threads = 1 or 2 only. */
Clone this wiki locally