iText 7 7.1.8 API
iText.Kernel.Pdf.Filters.FlateDecodeFilter Class Reference

Handles FlateDecode filter. More...

Inheritance diagram for iText.Kernel.Pdf.Filters.FlateDecodeFilter:
iText.Kernel.Pdf.MemoryLimitsAwareFilter iText.Kernel.Pdf.Filters.IFilterHandler iText.Kernel.Pdf.Filters.FlateDecodeStrictFilter

Public Member Functions

  FlateDecodeFilter ()
  Creates a FlateDecodeFilter. More...
 
  FlateDecodeFilter (bool strictDecoding)
  Creates a FlateDecodeFilter. More...
 
virtual bool  IsStrictDecoding ()
  Checks whether the decoder will try to read a corrupted stream (not strict) or not (strict) More...
 
virtual iText.Kernel.Pdf.Filters.FlateDecodeFilter  SetStrictDecoding (bool strict)
  Defines how the corrupted streams should be treated. More...
 
override byte[]  Decode (byte[] b, PdfName filterName, PdfObject decodeParams, PdfDictionary streamDictionary)
  Decode the byte[] using the provided filterName. More...
 
- Public Member Functions inherited from iText.Kernel.Pdf.MemoryLimitsAwareFilter
virtual MemoryStream  EnableMemoryLimitsAwareHandler (PdfDictionary streamDictionary)
  Creates a MemoryLimitsAwareOutputStream which will be used for decompression of the passed pdf stream. More...
 

Static Public Member Functions

static byte[]  FlateDecode (byte[] @in, bool strict)
  A helper to flateDecode. More...
 
static byte[]  DecodePredictor (byte[] @in, PdfObject decodeParams)
 

Detailed Description

Handles FlateDecode filter.

Constructor & Destructor Documentation

◆ FlateDecodeFilter() [1/2]

iText.Kernel.Pdf.Filters.FlateDecodeFilter.FlateDecodeFilter ( )
inline

Creates a FlateDecodeFilter.

◆ FlateDecodeFilter() [2/2]

iText.Kernel.Pdf.Filters.FlateDecodeFilter.FlateDecodeFilter ( bool  strictDecoding )
inline

Creates a FlateDecodeFilter.

Parameters
strictDecoding defines whether the decoder will try to read a corrupted stream

Member Function Documentation

◆ Decode()

override byte [] iText.Kernel.Pdf.Filters.FlateDecodeFilter.Decode ( byte[]  b,
PdfName  filterName,
PdfObject  decodeParams,
PdfDictionary  streamDictionary 
)
inlinevirtual

Decode the byte[] using the provided filterName.

Implements iText.Kernel.Pdf.MemoryLimitsAwareFilter.

Reimplemented in iText.Kernel.Pdf.Filters.FlateDecodeStrictFilter.

◆ DecodePredictor()

static byte [] iText.Kernel.Pdf.Filters.FlateDecodeFilter.DecodePredictor ( byte @[]  in,
PdfObject  decodeParams 
)
inlinestatic
Parameters
in Input byte array.
decodeParams PdfDictionary of decodeParams.
Returns
a byte array

◆ FlateDecode()

static byte [] iText.Kernel.Pdf.Filters.FlateDecodeFilter.FlateDecode ( byte @[]  in,
bool  strict 
)
inlinestatic

A helper to flateDecode.

Parameters
in the input data
strict

true to read a correct stream. false to try to read a corrupted stream.

Returns
the decoded data

◆ IsStrictDecoding()

virtual bool iText.Kernel.Pdf.Filters.FlateDecodeFilter.IsStrictDecoding ( )
inlinevirtual

Checks whether the decoder will try to read a corrupted stream (not strict) or not (strict)

Returns
true if the decoder will try to read a corrupted stream otherwise false

◆ SetStrictDecoding()

virtual iText.Kernel.Pdf.Filters.FlateDecodeFilter iText.Kernel.Pdf.Filters.FlateDecodeFilter.SetStrictDecoding ( bool  strict )
inlinevirtual

Defines how the corrupted streams should be treated.

Parameters
strict true if the decoder should try to read a corrupted stream otherwise false
Returns
the decoder