public class LZWCodec extends BaseCodec
CLEAR and END_OF_INFORMATION codes)
are taken in account.
Estimating the worst-case size of compressor output:
| Constructor and Description |
|---|
LZWCodec() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] input,
CodecOptions options)
Compresses a block of data.
|
ByteBuffer |
compress(ByteBuffer output,
byte[] input,
CodecOptions options)
Compress using ByteBuffers.
|
byte[] |
decompress(loci.common.RandomAccessInputStream in,
CodecOptions options)
The CodecOptions parameter should have the following fields set:
maxBytes |
compress, decompress, decompress, decompress, decompress, testpublic byte[] compress(byte[] input,
CodecOptions options)
throws CodecException
Codecinput - The data to be compressed.options - Options to be used during compression, if appropriate.CodecException - If input is not a compressed data block of the
appropriate type.public ByteBuffer compress(ByteBuffer output, byte[] input, CodecOptions options) throws CodecException
BaseCodeccompress in interface Codeccompress in class BaseCodecoutput - A preallocated ByteBuffer that may be used for the compressed data. This may be null to force the compressor to allocate a fresh buffer.input - The data to be compressed.options - Options to be used during compression, if appropriate.CodecException - If input cannot be processed.Codec.compress(ByteBuffer, byte[], CodecOptions)public byte[] decompress(loci.common.RandomAccessInputStream in,
CodecOptions options)
throws CodecException,
IOException
maxBytesdecompress in interface Codecdecompress in class BaseCodecin - The stream from which to read compressed data.options - Options to be used during decompression.CodecException - If data is not valid compressed data for this
decompressor.IOExceptionCodec.decompress(RandomAccessInputStream, CodecOptions)Copyright © 2005–2025 Open Microscopy Environment. All rights reserved.