Class RiceCompressor.IntRiceCompressor

  • All Implemented Interfaces:
    ICompressor<java.nio.IntBuffer>
    Enclosing class:
    RiceCompressor<T extends java.nio.Buffer>

    public static class RiceCompressor.IntRiceCompressor
    extends RiceCompressor<java.nio.IntBuffer>
    • Field Detail

      • pixelBuffer

        private java.nio.IntBuffer pixelBuffer
    • Method Detail

      • compress

        public boolean compress​(java.nio.IntBuffer buffer,
                                java.nio.ByteBuffer writeBuffer)
        Description copied from interface: ICompressor
        compress the buffer into the byte buffer. Attention enough space must already be allocated.
        Parameters:
        buffer - the buffer to compress.
        writeBuffer - the compressed data
        Returns:
        true if the compression succeeded.
      • decompress

        public void decompress​(java.nio.ByteBuffer readBuffer,
                               java.nio.IntBuffer buffer)
        Description copied from interface: ICompressor
        Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.
        Parameters:
        readBuffer - the compressed data
        buffer - the buffer to fill with the uncompressed data.
      • nextPixel

        protected void nextPixel​(int pixel)
        Specified by:
        nextPixel in class RiceCompressor<java.nio.IntBuffer>