Class LZWDecodeFilter

    • Constructor Detail

      • LZWDecodeFilter

        public LZWDecodeFilter()
    • Method Detail

      • LZWDecode

        public static byte[] LZWDecode​(byte[] in)
        Decodes a byte[] according to the LZW encoding.
        Parameters:
        in - byte[] to be decoded
        Returns:
        decoded byte[]
      • decode

        public byte[] decode​(byte[] b,
                             PdfName filterName,
                             PdfObject decodeParams,
                             PdfDictionary streamDictionary)
        Decode the byte[] using the provided filterName.
        Parameters:
        b - the bytes that need to be decoded
        filterName - PdfName of the filter
        decodeParams - decode parameters
        streamDictionary - the dictionary of the stream. Can contain additional information needed to decode the byte[].
        Returns:
        decoded byte array
      • LZWDecodeInternal

        private static byte[] LZWDecodeInternal​(byte[] in,
                                                java.io.ByteArrayOutputStream out)
        Decodes a byte[] according to the LZW encoding.
        Parameters:
        in - byte[] to be decoded
        out - the out stream which will be used to write the bytes.
        Returns:
        decoded byte[]