Class ArithmeticIntegerDecoder

java.lang.Object
org.apache.pdfbox.jbig2.decoder.arithmetic.ArithmeticIntegerDecoder

public class ArithmeticIntegerDecoder extends Object
This class represents the arithmetic integer decoder, described in ISO/IEC 14492:2001 (Annex A).
  • Field Details

  • Constructor Details

    • ArithmeticIntegerDecoder

      public ArithmeticIntegerDecoder(ArithmeticDecoder decoder)
  • Method Details

    • decode

      public long decode(CX cxIAx) throws IOException
      Arithmetic Integer Decoding Procedure, Annex A.2.
      Parameters:
      cxIAx - to be decoded value
      Returns:
      Decoded value.
      Throws:
      IOException - if an underlying IO operation fails
    • setPrev

      private void setPrev(int bit)
    • decodeIAID

      public int decodeIAID(CX cxIAID, long symCodeLen) throws IOException
      The IAID decoding procedure, Annex A.3.
      Parameters:
      cxIAID - - The contexts and statistics for decoding procedure.
      symCodeLen - - Symbol code length.
      Returns:
      The decoded value.
      Throws:
      IOException - if an underlying IO operation fails