Class LZWFilter

java.lang.Object
org.sejda.sambox.filter.Filter
org.sejda.sambox.filter.LZWFilter

public class LZWFilter extends Filter
This is the filter used for the LZWDecode filter.
Author:
Ben Litchfield, Tilman Hausherr
  • Field Details

  • Constructor Details

    • LZWFilter

      public LZWFilter()
  • Method Details

    • decode

      public DecodeResult decode(InputStream encoded, OutputStream decoded, COSDictionary parameters, int index) throws IOException
      Decodes data, producing the original non-encoded data.
      Specified by:
      decode in class Filter
      Parameters:
      encoded - the encoded byte stream
      decoded - the stream where decoded data will be written
      parameters - the parameters used for decoding
      index - the index to the filter being decoded
      Returns:
      repaired parameters dictionary, or the original parameters dictionary
      Throws:
      IOException - if the stream cannot be decoded
    • encode

      public void encode(InputStream rawData, OutputStream encoded, COSDictionary parameters) throws IOException
      Description copied from class: Filter
      Encodes data.
      Specified by:
      encode in class Filter
      Parameters:
      rawData - the byte stream to encode
      encoded - the stream where encoded data will be written
      parameters - the parameters used for encoding
      Throws:
      IOException - if the stream cannot be encoded