|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Codec
This class is an interface for any kind of compression or decompression. Data is presented to the compressor in a 1D or 2D byte array, with (optionally, depending on the compressor) pixel dimensions and an Object containing any other options the compressor may need. If an argument is not appropriate for the compressor type, it is expected to completely ignore the argument. i.e.: Passing a compressor that does not require pixel dimensions null for the dimensions must not cause the compressor to throw a NullPointerException. Classes implementing the Codec interface are expected to either implement both compression methods or neither. (The same is expected for decompression).
Method Summary | |
---|---|
byte[] |
compress(byte[][] data,
int x,
int y,
int[] dims,
Object options)
Compresses a block of data. |
byte[] |
compress(byte[] data,
int x,
int y,
int[] dims,
Object options)
Compresses a block of data. |
byte[] |
decompress(byte[] data)
Decompresses a block of data. |
byte[] |
decompress(byte[][] data)
Decompresses a block of data. |
byte[] |
decompress(byte[][] data,
Object options)
Decompresses a block of data. |
byte[] |
decompress(byte[] data,
Object options)
Decompresses a block of data. |
Method Detail |
---|
byte[] compress(byte[] data, int x, int y, int[] dims, Object options) throws loci.formats.FormatException
data
- The data to be compressed.x
- Length of the x dimension of the image data, if appropriate.y
- Length of the y dimension of the image data, if appropriate.dims
- The dimensions of the image data, if appropriate.options
- Options to be used during compression, if appropriate.
loci.formats.FormatException
- If input is not a compressed data block of the
appropriate type.byte[] compress(byte[][] data, int x, int y, int[] dims, Object options) throws loci.formats.FormatException
data
- The data to be compressed.x
- Length of the x dimension of the image data, if appropriate.y
- Length of the y dimension of the image data, if appropriate.dims
- The dimensions of the image data, if appropriate.options
- Options to be used during compression, if appropriate.
loci.formats.FormatException
- If input is not a compressed data block of the
appropriate type.byte[] decompress(byte[] data, Object options) throws loci.formats.FormatException
data
- the data to be decompressedoptions
- Options to be used during decompression.
loci.formats.FormatException
- If data is not valid.byte[] decompress(byte[][] data, Object options) throws loci.formats.FormatException
data
- the data to be decompressedoptions
- Options to be used during decompression.
loci.formats.FormatException
- If data is not valid.byte[] decompress(byte[] data) throws loci.formats.FormatException
data
- the data to be decompressed.
loci.formats.FormatException
- If data is not valid compressed data for this
decompressor.byte[] decompress(byte[][] data) throws loci.formats.FormatException
data
- The data to be decompressed.
loci.formats.FormatException
- If data is not valid compressed data for this
decompressor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |