RangeEncoder
Date: 2017-02-08

org.tukaani.xz.rangecoder

## Class RangeEncoder

- java.lang.Object
- - org.tukaani.xz.rangecoder.RangeCoder
  - - org.tukaani.xz.rangecoder.RangeEncoder

- Direct Known Subclasses:
    RangeEncoderToBuffer, RangeEncoderToStream

      public abstract class RangeEncoder
      extends RangeCoder

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `RangeEncoder()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `encodeBit(short[] probs, int index, int bit)`
    `void` | `encodeBitTree(short[] probs, int symbol)`
    `void` | `encodeDirectBits(int value, int count)`
    `void` | `encodeReverseBitTree(short[] probs, int symbol)`
    `int` | `finish()`
    `static int` | `getBitPrice(int prob, int bit)`
    `static int` | `getBitTreePrice(short[] probs, int symbol)`
    `static int` | `getDirectBitsPrice(int count)`
    `int` | `getPendingSize()`
    `static int` | `getReverseBitTreePrice(short[] probs, int symbol)`
    `void` | `reset()`

    - ### Methods inherited from class org.tukaani.xz.rangecoder.RangeCoder

      `initProbs`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### RangeEncoder

          public RangeEncoder()

  - ### Method Detail

    - #### reset

          public void reset()

    - #### getPendingSize

          public int getPendingSize()

    - #### finish

          public int finish()
                     throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### encodeBit

          public void encodeBit(short[] probs,
                       int index,
                       int bit)
                         throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getBitPrice

          public static int getBitPrice(int prob,
                        int bit)

    - #### encodeBitTree

          public void encodeBitTree(short[] probs,
                           int symbol)
                             throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getBitTreePrice

          public static int getBitTreePrice(short[] probs,
                            int symbol)

    - #### encodeReverseBitTree

          public void encodeReverseBitTree(short[] probs,
                                  int symbol)
                                    throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getReverseBitTreePrice

          public static int getReverseBitTreePrice(short[] probs,
                                   int symbol)

    - #### encodeDirectBits

          public void encodeDirectBits(int value,
                              int count)
                                throws java.io.IOException

      Throws:
        `java.io.IOException`

    - #### getDirectBitsPrice

          public static int getDirectBitsPrice(int count)