Package ome.codecs

Class PassthroughCodec

  • All Implemented Interfaces:
    Codec

    public class PassthroughCodec
    extends BaseCodec
    A codec which just returns the exact data it was given, performing no compression or decompression.
    • Constructor Detail

      • PassthroughCodec

        public PassthroughCodec()
    • Method Detail

      • decompress

        public byte[] decompress​(byte[] data,
                                 CodecOptions options)
                          throws CodecException
        Description copied from interface: Codec
        Decompresses a block of data.
        Specified by:
        decompress in interface Codec
        Overrides:
        decompress in class BaseCodec
        Parameters:
        data - the data to be decompressed
        options - Options to be used during decompression.
        Returns:
        the decompressed data.
        Throws:
        CodecException - If data is not valid.
      • decompress

        public byte[] decompress​(loci.common.RandomAccessInputStream in,
                                 CodecOptions options)
                          throws CodecException,
                                 IOException
        Description copied from interface: Codec
        Decompresses data from the given RandomAccessInputStream.
        Specified by:
        decompress in interface Codec
        Specified by:
        decompress in class BaseCodec
        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
      • compress

        public byte[] compress​(byte[] data,
                               CodecOptions options)
                        throws CodecException
        Description copied from interface: Codec
        Compresses 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.