java.lang.Object
org.glassfish.grizzly.compression.lzma.impl.rangecoder.RangeEncoder

public class RangeEncoder extends Object
RangeEncoder
Author:
Igor Pavlov
  • Field Details

  • Constructor Details

    • RangeEncoder

      public RangeEncoder()
  • Method Details

    • setBuffer

      public void setBuffer(Buffer dst, MemoryManager mm)
    • releaseBuffer

      public Buffer releaseBuffer()
    • init

      public void init()
    • flushData

      public void flushData() throws IOException
      Throws:
      IOException
    • shiftLow

      public void shiftLow() throws IOException
      Throws:
      IOException
    • encodeDirectBits

      public void encodeDirectBits(int v, int numTotalBits) throws IOException
      Throws:
      IOException
    • getProcessedSizeAdd

      public long getProcessedSizeAdd()
    • initBitModels

      public static void initBitModels(short[] probs)
    • encode

      public void encode(short[] probs, int index, int symbol) throws IOException
      Throws:
      IOException
    • getPrice

      public static int getPrice(int Prob, int symbol)
    • getPrice0

      public static int getPrice0(int Prob)
    • getPrice1

      public static int getPrice1(int Prob)