bundles/org.tukani.xz/src/org/tukaani/xz/LZMA2Options.java
public int getDecoderMemoryUsage() {
        // Round the dictionary size up to the next 2^n or 2^n + 2^(n-1).
        int d = dictSize - 1;
        d |= d >>> 2;
        d |= d >>> 3;
        d |= d >>> 4;
        d |= d >>> 8;
        d |= d >>> 16;
        return LZMA2InputStream.getMemoryUsage(d + 1);
    }
public int getDecoderMemoryUsage() {
        // Round the dictionary size up to the next 2^n or 2^n + 2^(n-1).
        int d = dictSize - 1;
        d |= d >>> 2;
        d |= d >>> 3;
        d |= d >>> 4;
        d |= d >>> 8;
        d |= d >>> 16;
        return LZMA2InputStream.getMemoryUsage(d + 1);
    }
Gets how much memory the LZMA2 decoder will need to decompress the data
that was encoded with these options and stored in a .xz file.
<p>
The returned value may bigger than the value returned by a direct call
to {@link LZMA2InputStream#getMemoryUsage(int)} if the dictionary size
is not 2^n or 2^n&nbsp;+&nbsp;2^(n-1) bytes. This is because the .xz
headers store the dictionary size in such a format and other values
are rounded up to the next such value. Such rounding is harmess except
it might waste some memory if an unsual dictionary size is used.
<p>
If you use raw LZMA2 streams and unusual dictioanary size, call
{@link LZMA2InputStream#getMemoryUsage} directly to get raw decoder
memory requirements.