loci.formats.codec
Class LZOCodec

java.lang.Object
  extended by loci.formats.codec.BaseCodec
      extended by loci.formats.codec.LZOCodec
All Implemented Interfaces:
Codec

public class LZOCodec
extends BaseCodec
implements Codec

This class implements LZO decompression. Compression is not yet implemented.

Source code:
Trac, SVN

Author:
Melissa Linkert linkert at wisc.edu

Constructor Summary
LZOCodec()
           
 
Method Summary
 byte[] compress(byte[] data, int x, int y, int[] dims, Object options)
          Compresses a block of lzo data.
 byte[] decompress(byte[] src, Object options)
          Decodes an LZO-compressed array.
 
Methods inherited from class loci.formats.codec.BaseCodec
compress, decompress, decompress, decompress, test
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface loci.formats.codec.Codec
compress, decompress, decompress, decompress
 

Constructor Detail

LZOCodec

public LZOCodec()
Method Detail

compress

public byte[] compress(byte[] data,
                       int x,
                       int y,
                       int[] dims,
                       Object options)
                throws loci.formats.FormatException
Compresses a block of lzo data. Currently not supported.

Specified by:
compress in interface Codec
Parameters:
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
Returns:
The compressed data
Throws:
loci.formats.FormatException - If input is not an LZO-compressed data block.

decompress

public byte[] decompress(byte[] src,
                         Object options)
                  throws loci.formats.FormatException
Decodes an LZO-compressed array. Adapted from LZO for Java, available at http://www.oberhumer.com/opensource/lzo/

Specified by:
decompress in interface Codec
Parameters:
src - the data to be decompressed
options - Options to be used during decompression.
Returns:
The decompressed data
Throws:
loci.formats.FormatException - if data is not valid compressed data for this decompressor