Class LZW


public class LZW extends Filter
LZW
  • Constructor Details

    • LZW

      public LZW(FilterOptions options, int width, int height)
  • Method Details

    • decode

      public byte[] decode(byte[] data) throws Exception
      LZW decode
      Specified by:
      decode in class Filter
      Parameters:
      data - byte[] to be decoded
      Returns:
      the decoded byte[]
      Throws:
      Exception - if data cannot be read
    • decode

      public void decode(BufferedInputStream bis, BufferedOutputStream streamCache, String cacheName, Map<String,String> cachedObjects) throws Exception
      LZW decode
      Specified by:
      decode in class Filter
      Parameters:
      bis - BufferedInputStream to be decoded
      streamCache - the decoded stream
      cacheName - the name of the cache object
      cachedObjects - Map of the cache object
      Throws:
      Exception - if data cannot be read
    • encode

      public void encode(BufferedInputStream bis, BufferedOutputStream bos) throws Exception
      LZW encode
      Specified by:
      encode in class Filter
      Parameters:
      bis - BufferedInputStream to be encoded
      bos - the encoded stream
      Throws:
      Exception - if the stream cannot be read
    • encode

      public byte[] encode(byte[] buffer)
      LZW encode
      Specified by:
      encode in class Filter
      Parameters:
      buffer - Byte[] to be encoded
      Returns:
      byte[] of the encoded data
    • decompress

      public byte[] decompress(byte[] input, boolean earlyChange) throws IOException
      Throws:
      IOException
    • decompress

      public void decompress(byte[] output, byte[] input, boolean earlyChange)
    • decompress

      public void decompress(BufferedOutputStream output, BufferedInputStream input, boolean earlyChange) throws IOException
      Throws:
      IOException