Class MMRDecompressor.RunData
- java.lang.Object
-
- org.apache.pdfbox.jbig2.decoder.mmr.MMRDecompressor.RunData
-
- Enclosing class:
- MMRDecompressor
private final class MMRDecompressor.RunData extends java.lang.ObjectA class encapsulating the compressed raw data.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) byte[]buffer(package private) intbufferBase(package private) intbufferTopprivate static intCODE_OFFSET(package private) intlastCode(package private) intlastOffsetprivate static intMAX_RUN_DATA_BUFFERprivate static intMIN_RUN_DATA_BUFFER(package private) intoffset(package private) javax.imageio.stream.ImageInputStreamstreamCompressed data stream.
-
Constructor Summary
Constructors Constructor Description RunData(javax.imageio.stream.ImageInputStream stream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidalign()Skip to next byteprivate voidfillBuffer(int byteOffset)private MMRDecompressor.CodeuncompressGetCode(MMRDecompressor.Code[] table)private MMRDecompressor.CodeuncompressGetCodeLittleEndian(MMRDecompressor.Code[] table)private intuncompressGetNextCodeLittleEndian()Fill up the code word in little endian mode.
-
-
-
Field Detail
-
MAX_RUN_DATA_BUFFER
private static final int MAX_RUN_DATA_BUFFER
- See Also:
- Constant Field Values
-
MIN_RUN_DATA_BUFFER
private static final int MIN_RUN_DATA_BUFFER
- See Also:
- Constant Field Values
-
CODE_OFFSET
private static final int CODE_OFFSET
- See Also:
- Constant Field Values
-
stream
javax.imageio.stream.ImageInputStream stream
Compressed data stream.
-
offset
int offset
-
lastOffset
int lastOffset
-
lastCode
int lastCode
-
buffer
byte[] buffer
-
bufferBase
int bufferBase
-
bufferTop
int bufferTop
-
-
Method Detail
-
uncompressGetCode
private final MMRDecompressor.Code uncompressGetCode(MMRDecompressor.Code[] table)
-
uncompressGetCodeLittleEndian
private final MMRDecompressor.Code uncompressGetCodeLittleEndian(MMRDecompressor.Code[] table)
-
uncompressGetNextCodeLittleEndian
private final int uncompressGetNextCodeLittleEndian()
Fill up the code word in little endian mode. This is a hotspot, therefore the algorithm is heavily optimised. For the frequent cases (i.e. short words) we try to get away with as little work as possible.
This method returns code words of 16 bits, which are aligned to the 24th bit. The lowest 8 bits are used as a "queue" of bits so that an access to the actual data is only needed, when this queue becomes empty.
-
fillBuffer
private void fillBuffer(int byteOffset) throws java.io.IOException- Throws:
java.io.IOException
-
align
private void align()
Skip to next byte
-
-