Package ome.codecs
Class LZ4Codec
java.lang.Object
ome.codecs.BaseCodec
ome.codecs.LZ4Codec
- All Implemented Interfaces:
Codec
This class implements LZ4 decompression.
- Author:
- Rolf Harkes r.harkes at nki.nl
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbyte[]compress(byte[] data, CodecOptions options) Compresses a block of data.byte[]decompress(byte[] data) Decompresses a block of data.byte[]decompress(byte[] data, int inputOffset, int length, int outputLength) Decompresses a block of data of specified length from an initial offset.byte[]decompress(byte[] data, CodecOptions options) Decompresses a block of data.byte[]decompress(loci.common.RandomAccessInputStream in, CodecOptions options) Decompresses data from the given RandomAccessInputStream.Methods inherited from class ome.codecs.BaseCodec
compress, compress, decompress, decompress, test
-
Constructor Details
-
LZ4Codec
public LZ4Codec()
-
-
Method Details
-
compress
Description copied from interface:CodecCompresses a block of data.- Parameters:
data- The data to be compressed.options- Options to be used during compression, if appropriate.- Returns:
- The compressed data.
- Throws:
CodecException- If input is not a compressed data block of the appropriate type.
-
decompress
public byte[] decompress(loci.common.RandomAccessInputStream in, CodecOptions options) throws CodecException, IOException Description copied from interface:CodecDecompresses data from the given RandomAccessInputStream.- Specified by:
decompressin interfaceCodec- Specified by:
decompressin classBaseCodec- Parameters:
in- The stream from which to read compressed data.options- Options to be used during decompression.- Returns:
- The decompressed data.
- Throws:
CodecException- If data is not valid compressed data for this decompressor.IOException
-
decompress
Description copied from interface:CodecDecompresses a block of data.- Specified by:
decompressin interfaceCodec- Overrides:
decompressin classBaseCodec- Parameters:
data- the data to be decompressed.- Returns:
- The decompressed data.
- Throws:
CodecException- If data is not valid compressed data for this decompressor.
-
decompress
Description copied from interface:CodecDecompresses a block of data.- Specified by:
decompressin interfaceCodec- Overrides:
decompressin classBaseCodec- Parameters:
data- the data to be decompressedoptions- Options to be used during decompression.- Returns:
- the decompressed data.
- Throws:
CodecException- If data is not valid.
-
decompress
public byte[] decompress(byte[] data, int inputOffset, int length, int outputLength) throws CodecException Decompresses a block of data of specified length from an initial offset.- Parameters:
data- The data to be decompressed.inputOffset- The position of the input data at which to begin decompression.length- The length of input data to be decompressed.- Returns:
- The decompressed data.
- Throws:
CodecException- If data is not valid.
-