Class Encoder


  • public class Encoder
    extends java.lang.Object
    • Field Detail

      • Stream

        private java.io.OutputStream Stream
      • Low

        private long Low
      • Range

        private int Range
      • _cacheSize

        private int _cacheSize
      • _cache

        private int _cache
      • _position

        private long _position
      • ProbPrices

        private static final int[] ProbPrices
    • Constructor Detail

      • Encoder

        public Encoder()
    • Method Detail

      • setStream

        public void setStream​(java.io.OutputStream stream)
      • releaseStream

        public void releaseStream()
      • init

        public void init()
      • flushData

        public void flushData()
                       throws java.io.IOException
        Throws:
        java.io.IOException
      • flushStream

        public void flushStream()
                         throws java.io.IOException
        Throws:
        java.io.IOException
      • shiftLow

        void shiftLow()
               throws java.io.IOException
        Throws:
        java.io.IOException
      • encodeDirectBits

        public void encodeDirectBits​(int v,
                                     int numTotalBits)
                              throws java.io.IOException
        Throws:
        java.io.IOException
      • getProcessedSizeAdd

        public long getProcessedSizeAdd()
      • initBitModels

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

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

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

        public static int getPrice0​(int Prob)
      • getPrice1

        public static int getPrice1​(int Prob)