Class RiceCompressor<T extends Buffer>
java.lang.Object
nom.tam.fits.compression.algorithm.rice.RiceCompressor<T>
- Type Parameters:
T
- the genetic type of NIO buffer on which this compressor operates.
- All Implemented Interfaces:
ICompressor<T>
- Direct Known Subclasses:
RiceCompressor.ByteRiceCompressor
,RiceCompressor.IntRiceCompressor
,RiceCompressor.ShortRiceCompressor
(for internal use) The Rice compression algorithm. The original compression was designed by Rice, Yeh, and
Miller the code was written by Richard White at STScI at the STScI and included (ported to c and adapted) in cfitsio
by William Pence, NASA/GSFC. That code was then ported to java by R. van Nieuwenhoven. Later it was massively
refactored to harmonize the different compression algorithms and reduce the duplicate code pieces without obscuring
the algorithm itself as far as possible.
- Author:
- Richard White, William Pence, Richard van Nieuwenhoven
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
static class
static class
static class
static class
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
compress the integer tiledImageOperation on a rise compressed byte buffer.protected void
decompressBuffer
(ByteBuffer readBuffer, int nx) decompress the readbuffer and fill the pixelarray.protected abstract int
protected abstract void
nextPixel
(int pixel) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface nom.tam.fits.compression.algorithm.api.ICompressor
compress, decompress
-
Method Details
-
compress
compress the integer tiledImageOperation on a rise compressed byte buffer.- Parameters:
dataLength
- length of the data to compressfirstPixel
- the value of the first pixelbuffer
- the buffer to write to
-
decompressBuffer
decompress the readbuffer and fill the pixelarray.- Parameters:
readBuffer
- input buffernx
- the number of pixel to uncompress
-
nextPixel
protected abstract int nextPixel() -
nextPixel
protected abstract void nextPixel(int pixel)
-