View Source Pdf.Reader.Filter.Flate (ExPDF v1.0.1)

FlateDecode filter — zlib inflate, with optional PNG and TIFF predictor un-filtering.

Predictor support

Predictor values in /DecodeParms:

  • 1 (default) — no predictor.
  • 2 — TIFF Predictor 2 (horizontal differencing), applied row-by-row.
  • 10 — PNG None (row type 0 prefix consumed and discarded).
  • 11 — PNG Sub.
  • 12 — PNG Up.
  • 13 — PNG Average.
  • 14 — PNG Paeth.
  • 15 — PNG Optimal (decoder treats row-type byte as the actual filter; this is the same as having per-row filter selection — just read the type byte per row).

DecodeParms keys

KeyDefaultMeaning
"Predictor"1Predictor type (1 = none)
"Columns"1Row width in samples
"Colors"1Number of color components per sample
"BitsPerComponent"8Bits per component

Summary

Functions

Inflate a zlib-compressed binary, then apply any configured predictor.

Functions

@spec decode(binary(), map()) :: {:ok, binary()} | {:error, term()}

Inflate a zlib-compressed binary, then apply any configured predictor.