Class RiceCompressor.ByteRiceCompressor
- java.lang.Object
-
- nom.tam.fits.compression.algorithm.rice.RiceCompressor<java.nio.ByteBuffer>
-
- nom.tam.fits.compression.algorithm.rice.RiceCompressor.ByteRiceCompressor
-
- All Implemented Interfaces:
ICompressor<java.nio.ByteBuffer>
- Enclosing class:
- RiceCompressor<T extends java.nio.Buffer>
public static class RiceCompressor.ByteRiceCompressor extends RiceCompressor<java.nio.ByteBuffer>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nom.tam.fits.compression.algorithm.rice.RiceCompressor
RiceCompressor.ByteRiceCompressor, RiceCompressor.DoubleRiceCompressor, RiceCompressor.FloatRiceCompressor, RiceCompressor.IntRiceCompressor, RiceCompressor.ShortRiceCompressor
-
-
Field Summary
Fields Modifier and Type Field Description private java.nio.ByteBuffer
pixelBuffer
-
Constructor Summary
Constructors Constructor Description ByteRiceCompressor(RiceCompressOption option)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
compress(java.nio.ByteBuffer buffer, java.nio.ByteBuffer writeBuffer)
compress the buffer into the byte buffer.void
decompress(java.nio.ByteBuffer readBuffer, java.nio.ByteBuffer buffer)
Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.protected int
nextPixel()
protected void
nextPixel(int pixel)
-
Methods inherited from class nom.tam.fits.compression.algorithm.rice.RiceCompressor
compress, decompressBuffer
-
-
-
-
Constructor Detail
-
ByteRiceCompressor
public ByteRiceCompressor(RiceCompressOption option)
-
-
Method Detail
-
compress
public boolean compress(java.nio.ByteBuffer 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.ByteBuffer 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 databuffer
- the buffer to fill with the uncompressed data.
-
nextPixel
protected int nextPixel()
- Specified by:
nextPixel
in classRiceCompressor<java.nio.ByteBuffer>
-
nextPixel
protected void nextPixel(int pixel)
- Specified by:
nextPixel
in classRiceCompressor<java.nio.ByteBuffer>
-
-