Class MMRDecompressor.RunData

java.lang.Object
org.apache.pdfbox.jbig2.decoder.mmr.MMRDecompressor.RunData
Enclosing class:
MMRDecompressor

private final class MMRDecompressor.RunData extends Object
A class encapsulating the compressed raw data.
  • 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

      Compressed data stream.
    • offset

      int offset
    • lastOffset

      int lastOffset
    • lastCode

      int lastCode
    • buffer

      byte[] buffer
    • bufferBase

      int bufferBase
    • bufferTop

      int bufferTop
  • Constructor Details

  • Method Details

    • 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 IOException
      Throws:
      IOException
    • align

      private void align()
      Skip to next byte