bundles/org.tukani.xz/src/org/tukaani/xz/lz/LZEncoder.java
public static LZEncoder getInstance(
            int dictSize, int extraSizeBefore, int extraSizeAfter,
            int niceLen, int matchLenMax, int mf, int depthLimit,
            ArrayCache arrayCache) {
        switch (mf) {
            case MF_HC4:
                return new HC4(dictSize, extraSizeBefore, extraSizeAfter,
                               niceLen, matchLenMax, depthLimit, arrayCache);

            case MF_BT4:
                return new BT4(dictSize, extraSizeBefore, extraSizeAfter,
                               niceLen, matchLenMax, depthLimit, arrayCache);
        }

        throw new IllegalArgumentException();
    }
public static LZEncoder getInstance(
            int dictSize, int extraSizeBefore, int extraSizeAfter,
            int niceLen, int matchLenMax, int mf, int depthLimit,
            ArrayCache arrayCache) {
        switch (mf) {
            case MF_HC4:
                return new HC4(dictSize, extraSizeBefore, extraSizeAfter,
                               niceLen, matchLenMax, depthLimit, arrayCache);

            case MF_BT4:
                return new BT4(dictSize, extraSizeBefore, extraSizeAfter,
                               niceLen, matchLenMax, depthLimit, arrayCache);
        }

        throw new IllegalArgumentException();
    }
Creates a new LZEncoder.
<p>
@param       dictSize    dictionary size

@param       extraSizeBefore
number of bytes to keep available in the
history in addition to dictSize

@param       extraSizeAfter
number of bytes that must be available
after current position + matchLenMax

@param       niceLen     if a match of at least <code>niceLen</code>
bytes is found, be happy with it and don't
stop looking for longer matches

@param       matchLenMax don't test for matches longer than
<code>matchLenMax</code> bytes

@param       mf          match finder ID

@param       depthLimit  match finder search depth limit