Class RiceCompressor.ShortRiceCompressor
java.lang.Object
nom.tam.fits.compression.algorithm.rice.RiceCompressor<ShortBuffer>
nom.tam.fits.compression.algorithm.rice.RiceCompressor.ShortRiceCompressor
- All Implemented Interfaces:
ICompressor<ShortBuffer>
- Enclosing class:
RiceCompressor<T extends Buffer>
-
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
-
Constructor Summary
ConstructorsConstructorDescriptionRice compression of 16-bit integer streams with the default block size of 32. -
Method Summary
Modifier and TypeMethodDescriptionboolean
compress
(ShortBuffer buffer, ByteBuffer writeBuffer) compress the buffer into the byte buffer.void
decompress
(ByteBuffer readBuffer, ShortBuffer buffer) Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.protected int
protected void
nextPixel
(int pixel) Methods inherited from class nom.tam.fits.compression.algorithm.rice.RiceCompressor
compress, decompressBuffer
-
Constructor Details
-
ShortRiceCompressor
public ShortRiceCompressor()Rice compression of 16-bit integer streams with the default block size of 32.- Since:
- 1.19.1
-
ShortRiceCompressor
-
-
Method Details
-
compress
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
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<ShortBuffer>
-
nextPixel
protected void nextPixel(int pixel) - Specified by:
nextPixel
in classRiceCompressor<ShortBuffer>
-