Class MMRDecompressor.RunData
java.lang.Object
org.apache.pdfbox.jbig2.decoder.mmr.MMRDecompressor.RunData
- Enclosing class:
MMRDecompressor
A class encapsulating the compressed raw data.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) byte[]
(package private) int
(package private) int
private static final int
(package private) int
(package private) int
private static final int
private static final int
(package private) int
(package private) ImageInputStream
Compressed data stream. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
align()
Skip to next byteprivate void
fillBuffer
(int byteOffset) private final MMRDecompressor.Code
uncompressGetCode
(MMRDecompressor.Code[] table) private final MMRDecompressor.Code
private final int
Fill up the code word in little endian mode.
-
Field Details
-
MAX_RUN_DATA_BUFFER
private static final int MAX_RUN_DATA_BUFFER- See Also:
-
MIN_RUN_DATA_BUFFER
private static final int MIN_RUN_DATA_BUFFER- See Also:
-
CODE_OFFSET
private static final int CODE_OFFSET- See Also:
-
stream
ImageInputStream streamCompressed data stream. -
offset
int offset -
lastOffset
int lastOffset -
lastCode
int lastCode -
buffer
byte[] buffer -
bufferBase
int bufferBase -
bufferTop
int bufferTop
-
-
Constructor Details
-
RunData
RunData(ImageInputStream stream)
-
-
Method Details
-
uncompressGetCode
-
uncompressGetCodeLittleEndian
-
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
- Throws:
IOException
-
align
private void align()Skip to next byte
-