Class GZip2Compressor<T extends Buffer>
java.lang.Object
nom.tam.fits.compression.algorithm.gzip.GZipCompressor<T>
nom.tam.fits.compression.algorithm.gzip2.GZip2Compressor<T>
- Type Parameters:
T- The genetic type of element buffer to compress
- All Implemented Interfaces:
ICompressor<T>
- Direct Known Subclasses:
GZip2Compressor.DoubleGZip2Compressor,GZip2Compressor.FloatGZip2Compressor,GZip2Compressor.IntGZip2Compressor,GZip2Compressor.LongGZip2Compressor,GZip2Compressor.ShortGZip2Compressor
(for internal use) The GZIP2 compression algorithm.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic classstatic classNested classes/interfaces inherited from class nom.tam.fits.compression.algorithm.gzip.GZipCompressor
GZipCompressor.ByteGZipCompressor, GZipCompressor.DoubleGZipCompressor, GZipCompressor.FloatGZipCompressor, GZipCompressor.IntGZipCompressor, GZipCompressor.LongGZipCompressor, GZipCompressor.ShortGZipCompressor -
Field Summary
Fields inherited from class nom.tam.fits.compression.algorithm.gzip.GZipCompressor
buffer, nioBuffer, primitiveSize -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancompress(T pixelData, ByteBuffer compressed) compress the buffer into the byte buffer.voiddecompress(ByteBuffer compressed, T pixelData) Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.byte[]shuffle(byte[] byteArray) byte[]unshuffle(byte[] byteArray) Methods inherited from class nom.tam.fits.compression.algorithm.gzip.GZipCompressor
createGZipInputStream, createGZipOutputStream, getPixel, setPixel
-
Constructor Details
-
GZip2Compressor
public GZip2Compressor(int primitiveSize)
-
-
Method Details
-
compress
Description copied from interface:ICompressorcompress the buffer into the byte buffer. Attention enough space must already be allocated.- Specified by:
compressin interfaceICompressor<T extends Buffer>- Overrides:
compressin classGZipCompressor<T extends Buffer>- Parameters:
pixelData- the buffer to compress.compressed- the compressed data- Returns:
- true if the compression succeeded.
-
decompress
Description copied from interface:ICompressorDecompress the byte buffer and restore the buffer from it, again enough space must already be allocated.- Specified by:
decompressin interfaceICompressor<T extends Buffer>- Overrides:
decompressin classGZipCompressor<T extends Buffer>- Parameters:
compressed- the compressed datapixelData- the buffer to fill with the uncompressed data.
-
shuffle
public byte[] shuffle(byte[] byteArray) -
unshuffle
public byte[] unshuffle(byte[] byteArray)
-