// Path: src/main/java/org/xbib/io/compress/xz/lz/Matches.java
// public final class Matches {
//     public final int[] len;
//     public final int[] dist;
//     public int count = 0;
// 
//     Matches(int countMax) {
//         len = new int[countMax];
//         dist = new int[countMax];
//     }
// }


import org.xbib.io.compress.xz.lz.LZEncoder;
import org.xbib.io.compress.xz.lz.Matches;
import org.xbib.io.compress.xz.rangecoder.RangeEncoder;
                + matchLenEncoder.getPrice(len, posState);
        int distState = getDistState(len);

        if (dist < FULL_DISTANCES) {
            price += fullDistPrices[distState][dist];
        } else {
            // Note that distSlotPrices includes also
            // the price of direct bits.
            int distSlot = getDistSlot(dist);
            price += distSlotPrices[distState][distSlot]
                    + alignPrices[dist & ALIGN_MASK];
        }

        return price;
    }

    private void updateDistPrices() {
        distPriceCount = DIST_PRICE_UPDATE_INTERVAL;

        for (int distState = 0; distState < DIST_STATES; ++distState) {
            for (int distSlot = 0; distSlot < distSlotPricesSize; ++distSlot) {
                distSlotPrices[distState][distSlot]
                        = RangeEncoder.getBitTreePrice(
                        distSlots[distState], distSlot);
            }

            for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
                 ++distSlot) {
                int count = (distSlot >>> 1) - 1 - ALIGN_BITS;
                distSlotPrices[distState][distSlot]
// Path: src/main/java/org/xbib/io/compress/xz/lz/Matches.java
// public final class Matches {
//     public final int[] len;
//     public final int[] dist;
//     public int count = 0;
// 
//     Matches(int countMax) {
//         len = new int[countMax];
//         dist = new int[countMax];
//     }
// }


// Path: src/main/java/org/xbib/io/compress/xz/lzma/LZMAEncoder.java
import org.xbib.io.compress.xz.lz.LZEncoder;
import org.xbib.io.compress.xz.lz.Matches;
import org.xbib.io.compress.xz.rangecoder.RangeEncoder;

                + matchLenEncoder.getPrice(len, posState);
        int distState = getDistState(len);

        if (dist < FULL_DISTANCES) {
            price += fullDistPrices[distState][dist];
        } else {
            // Note that distSlotPrices includes also
            // the price of direct bits.
            int distSlot = getDistSlot(dist);
            price += distSlotPrices[distState][distSlot]
                    + alignPrices[dist & ALIGN_MASK];
        }

        return price;
    }

    private void updateDistPrices() {
        distPriceCount = DIST_PRICE_UPDATE_INTERVAL;

        for (int distState = 0; distState < DIST_STATES; ++distState) {
            for (int distSlot = 0; distSlot < distSlotPricesSize; ++distSlot) {
                distSlotPrices[distState][distSlot]
                        = RangeEncoder.getBitTreePrice(
                        distSlots[distState], distSlot);
            }

            for (int distSlot = DIST_MODEL_END; distSlot < distSlotPricesSize;
                 ++distSlot) {
                int count = (distSlot >>> 1) - 1 - ALIGN_BITS;
                distSlotPrices[distState][distSlot]
                        += RangeEncoder.getDirectBitsPrice(count);