`xz-java` library: Is there any way to use «Extreme» presets?

69 Views Asked by At

Introduction

I have a couple of small and simple questions on the xz-java library.
In addition to asking the questions here I have asked the library author same questions by sending an email message.

The xz command-line tool supports the «Extreme» presets: see the -0e-9e command-line options.

An excerpt from man xz to show both (regular and extreme) preset families:

<…>

The following table summarises the features of the presets:

     Preset   DictSize   CompCPU   CompMem   DecMem
       -0     256 KiB       0        3 MiB    1 MiB
       -1       1 MiB       1        9 MiB    2 MiB
       -2       2 MiB       2       17 MiB    3 MiB
       -3       4 MiB       3       32 MiB    5 MiB
       -4       4 MiB       4       48 MiB    5 MiB
       -5       8 MiB       5       94 MiB    9 MiB
       -6       8 MiB       6       94 MiB    9 MiB
       -7      16 MiB       6      186 MiB   17 MiB
       -8      32 MiB       6      370 MiB   33 MiB
       -9      64 MiB       6      674 MiB   65 MiB

<…>

-e, --extreme
      Use a slower variant of the selected compression preset level (-0 ... -9) to hopefully get a little bit better compression ratio, but with bad luck this can also  make  it
      worse.  Decompressor memory usage is not affected, but compressor memory usage increases a little at preset levels -0 ... -3.

      Since  there  are  two  presets with dictionary sizes 4 MiB and 8 MiB, the presets -3e and -5e use slightly faster settings (lower CompCPU) than -4e and -6e, respectively.
      That way no two presets are identical.

             Preset   DictSize   CompCPU   CompMem   DecMem
              -0e     256 KiB       8        4 MiB    1 MiB
              -1e       1 MiB       8       13 MiB    2 MiB
              -2e       2 MiB       8       25 MiB    3 MiB
              -3e       4 MiB       7       48 MiB    5 MiB
              -4e       4 MiB       8       48 MiB    5 MiB
              -5e       8 MiB       7       94 MiB    9 MiB
              -6e       8 MiB       8       94 MiB    9 MiB
              -7e      16 MiB       8      186 MiB   17 MiB
              -8e      32 MiB       8      370 MiB   33 MiB
              -9e      64 MiB       8      674 MiB   65 MiB

<…>

Questions

1. Are extreme presets supported by the xz-java library?

I have taken a brief look at the source code and I have not found such support (org.tukaani.xz.LZMA2Options class).

2. If extreme presets are not supported, is there any way to introduce their support in the client code?

0

There are 0 best solutions below