source: josm/trunk/src/org/tukaani/xz/rangecoder/RangeCoder.java@ 13350

Last change on this file since 13350 was 13350, checked in by stoecker, 6 years ago

see #15816 - add XZ support

File size: 719 bytes
Line 
1/*
2 * RangeCoder
3 *
4 * Authors: Lasse Collin <lasse.collin@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
11package org.tukaani.xz.rangecoder;
12
13import java.util.Arrays;
14
15public 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}
Note: See TracBrowser for help on using the repository browser.