Class MMRDecompressor.RunData

  • Enclosing class:
    MMRDecompressor

    private final class MMRDecompressor.RunData
    extends java.lang.Object
    A class encapsulating the compressed raw data.
    • Field Detail

      • 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
    • Constructor Detail

      • RunData

        RunData​(javax.imageio.stream.ImageInputStream stream)
    • Method Detail

      • 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