public class LZWCodec extends BaseCodec implements Codec
| Modifier and Type | Field and Description |
|---|---|
protected static int |
CLEAR_CODE |
protected static int |
EOI_CODE |
| Constructor and Description |
|---|
LZWCodec() |
| Modifier and Type | Method and Description |
|---|---|
byte[] |
compress(byte[] input,
int x,
int y,
int[] dims,
Object options)
Compresses a block of data using LZW compression.
|
byte[] |
decompress(byte[] input,
Object options)
Decodes an LZW-compressed data block.
|
static void |
main(String[] args)
Main testing method.
|
compress, decompress, decompress, decompress, testclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompress, decompress, decompress, decompressprotected static final int CLEAR_CODE
protected static final int EOI_CODE
public byte[] compress(byte[] input,
int x,
int y,
int[] dims,
Object options)
throws loci.formats.FormatException
compress in interface Codecinput - the data to be compressedx - ignored for LZW.y - ignored for LZW.dims - ignored for LZW.options - ignored for LZW.loci.formats.FormatException - If input is not a compressed data block of the
appropriate type.public byte[] decompress(byte[] input,
Object options)
throws loci.formats.FormatException
decompress in interface Codecinput - the data to be decompressedoptions - Options to be used during decompression.loci.formats.FormatException - If input is not an LZW-compressed data block.public static void main(String[] args) throws loci.formats.FormatException
args - ignoredloci.formats.FormatException - Can only occur if there is a bug in the
compress method.