Class BrotliDecodeFilter

  • All Implemented Interfaces:
    Filter

    public class BrotliDecodeFilter
    extends java.lang.Object
    implements Filter
    /BrotliDecode: Brotli compression (RFC 7932), the PDF Association's extension for PDF 2.0. Takes the same optional Predictor parameters as FlateDecodeFilter.
    Since:
    v4.2.0
    • Constructor Detail

      • BrotliDecodeFilter

        public BrotliDecodeFilter()
    • Method Detail

      • decode

        public byte[] decode​(byte[] encoded,
                             COSDictionary parameters,
                             COSDictionary streamDict)
                      throws java.io.IOException
        Description copied from interface: Filter
        Decodes encoded using this filter's algorithm.
        Specified by:
        decode in interface Filter
        Parameters:
        encoded - the filtered bytes, as stored in the file
        parameters - this filter's DecodeParms dictionary (never null; empty if the stream had none)
        streamDict - the owning stream's full dictionary, in case a filter needs sibling entries (unused by the filters implemented here, but kept for extensibility/parity with PDFBox's Filter API)
        Throws:
        java.io.IOException
      • decompress

        public static byte[] decompress​(byte[] encoded)
                                 throws java.io.IOException
        Decodes a complete Brotli stream.
        Throws:
        java.io.IOException