Class ArithmeticIntegerDecoder
- java.lang.Object
-
- org.apache.pdfbox.jbig2.decoder.arithmetic.ArithmeticIntegerDecoder
-
public class ArithmeticIntegerDecoder extends java.lang.ObjectThis class represents the arithmetic integer decoder, described in ISO/IEC 14492:2001 (Annex A).
-
-
Field Summary
Fields Modifier and Type Field Description private ArithmeticDecoderdecoder
-
Constructor Summary
Constructors Constructor Description ArithmeticIntegerDecoder(ArithmeticDecoder decoder)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longdecode(CX cxIAx)Arithmetic Integer Decoding Procedure, Annex A.2.intdecodeIAID(CX cxIAID, long symCodeLen)The IAID decoding procedure, Annex A.3.private intsetPrev(int prev, int bit)
-
-
-
Field Detail
-
decoder
private final ArithmeticDecoder decoder
-
-
Constructor Detail
-
ArithmeticIntegerDecoder
public ArithmeticIntegerDecoder(ArithmeticDecoder decoder)
-
-
Method Detail
-
decode
public long decode(CX cxIAx) throws java.io.IOException
Arithmetic Integer Decoding Procedure, Annex A.2.- Parameters:
cxIAx- to be decoded value- Returns:
- Decoded value.
- Throws:
java.io.IOException- if an underlying IO operation fails
-
setPrev
private int setPrev(int prev, int bit)
-
decodeIAID
public int decodeIAID(CX cxIAID, long symCodeLen) throws java.io.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:
java.io.IOException- if an underlying IO operation fails
-
-