What Is Flate Compression in PDF? ZIP/DEFLATE for PDF Streams
Flate compression (DEFLATE/ZIP algorithm) is the primary lossless compression method for PDF text, fonts, and structure. Learn how it works and what gains to expect.
Flate compression — based on the DEFLATE algorithm, the same algorithm used in ZIP files and gzip — is the primary lossless compression method for PDF content streams, font programs, and other non-image data in PDF. It was introduced in PDF 1.2 and is now universally used. "FlateDecode" is the PDF filter name; when you see it in a PDF stream dictionary, that stream is ZIP-compressed.
How Flate Works
DEFLATE combines two compression techniques: LZ77 (replaces repeated sequences with back-references: "instead of repeating 'the', reference it from N bytes back") and Huffman coding (encodes frequent symbols with fewer bits than rare symbols). For PDF content streams — which contain repetitive PDF operator sequences like "BT (text) Tj ET" repeated thousands of times — LZ77's back-referencing achieves excellent compression ratios. Typical content stream compression: 50-80% size reduction.
What Flate Compresses in a PDF
- Content streams: page drawing instructions (text positioning, path drawing, color changes) — usually compresses 60-80%
- Font programs: Type 1 and CFF font outlines — compresses 40-70%
- Metadata streams: XMP metadata XML — compresses 70-85%
- Object streams (PDF 1.5+): groups of PDF objects compressed together — very effective for small objects, typically 50-70% reduction
- JPEG2000 data: sometimes wrapped with Flate for additional compression (though marginal since JPEG2000 is already compressed)
Flate vs LZW in PDF
LZW was the original lossless compression in early PDF versions, but Unisys held a patent on the LZW algorithm through the 1990s. PDF/A-1 explicitly bans LZW. DEFLATE (Flate) was adopted as the patent-free alternative and provides similar or better compression in practice. Modern PDFs universally use Flate; LZW is only encountered in very old PDF files and TIFF images embedded in PDFs.
Predictor Functions with Flate
Flate compression can be combined with a predictor function that pre-processes data before compression, dramatically improving ratios for certain data types. For image data, PNG predictors compute each pixel as a delta from the pixel above or to the left — since adjacent pixels in natural images are similar, deltas are small numbers that compress much better than raw values. For cross-reference streams, predictors reduce the byte size of object offsets. Using Flate + predictor for grayscale images can reduce file size by an additional 20-40% vs Flate alone.
Try Compress PDF Now — Free
Browser-based, private, and instant. No account or software required.
Open Compress PDF


