Class HCompressor.ByteHCompressor
- java.lang.Object
-
- nom.tam.fits.compression.algorithm.hcompress.HCompressor<java.nio.ByteBuffer>
-
- nom.tam.fits.compression.algorithm.hcompress.HCompressor.ByteHCompressor
-
- All Implemented Interfaces:
ICompressor<java.nio.ByteBuffer>
- Enclosing class:
- HCompressor<T extends java.nio.Buffer>
public static class HCompressor.ByteHCompressor extends HCompressor<java.nio.ByteBuffer>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nom.tam.fits.compression.algorithm.hcompress.HCompressor
HCompressor.ByteHCompressor, HCompressor.DoubleHCompressor, HCompressor.FloatHCompressor, HCompressor.IntHCompressor, HCompressor.ShortHCompressor
-
-
Field Summary
Fields Modifier and Type Field Description private static longBYTE_MASK_FOR_LONG
-
Constructor Summary
Constructors Constructor Description ByteHCompressor(HCompressorOption options)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancompress(java.nio.ByteBuffer buffer, java.nio.ByteBuffer compressed)compress the buffer into the byte buffer.voiddecompress(java.nio.ByteBuffer compressed, java.nio.ByteBuffer buffer)Decompress the byte buffer and restore the buffer from it, again enough space must already be allocated.-
Methods inherited from class nom.tam.fits.compression.algorithm.hcompress.HCompressor
compress, decompress
-
-
-
-
Field Detail
-
BYTE_MASK_FOR_LONG
private static final long BYTE_MASK_FOR_LONG
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ByteHCompressor
public ByteHCompressor(HCompressorOption options)
-
-
Method Detail
-
compress
public boolean compress(java.nio.ByteBuffer buffer, java.nio.ByteBuffer compressed)Description copied from interface:ICompressorcompress the buffer into the byte buffer. Attention enough space must already be allocated.- Parameters:
buffer- the buffer to compress.compressed- the compressed data- Returns:
- true if the compression succeeded.
-
decompress
public void decompress(java.nio.ByteBuffer compressed, java.nio.ByteBuffer buffer)Description copied from interface:ICompressorDecompress the byte buffer and restore the buffer from it, again enough space must already be allocated.- Parameters:
compressed- the compressed databuffer- the buffer to fill with the uncompressed data.
-
-