Class Encoder


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

    • 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

        public 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)