Home | History | Annotate | Download | only in rangecoder
      1 /*
      2  * RangeCoder
      3  *
      4  * Authors: Lasse Collin <lasse.collin (at) tukaani.org>
      5  *          Igor Pavlov <http://7-zip.org/>
      6  *
      7  * This file has been put into the public domain.
      8  * You can do whatever you want with this file.
      9  */
     10 
     11 package org.tukaani.xz.rangecoder;
     12 
     13 import java.util.Arrays;
     14 
     15 public abstract class RangeCoder {
     16     static final int SHIFT_BITS = 8;
     17     static final int TOP_MASK = 0xFF000000;
     18     static final int BIT_MODEL_TOTAL_BITS = 11;
     19     static final int BIT_MODEL_TOTAL = 1 << BIT_MODEL_TOTAL_BITS;
     20     static final short PROB_INIT = (short)(BIT_MODEL_TOTAL / 2);
     21     static final int MOVE_BITS = 5;
     22 
     23     public static final void initProbs(short[] probs) {
     24         Arrays.fill(probs, PROB_INIT);
     25     }
     26 }
     27