Classic ZIP: In Delphi, there is the class TZipFile. In FreePascal, there is the unit `zipper`, which provides the classes `TZipper` and `TUnZipper`, with which you can read/write complete .zip files – including multiple files, directory structure, password handling (standard ZipCrypto, no AES), etc. This is part of the standard FPC package `paszlib`, which comes automatically with every normal FPC/Lazarus installation (no separate download via OPM required).
ZIP practically always uses DEFLATE as its compression method – a relatively old algorithm (RFC 1951: LZ77 combined with Huffman coding) with medium compression ratio and medium speed, but offering universal compatibility, since it can be read on most systems without special software.
By contrast, ZPAQ aims for maximum compression ratio. It is a fairly young compression method, developed by ↗Matt Mahoney between 2001 and 2009. ZPAQ is slow and memory-hungry, even when decompressing, but practically always delivers the highest compression ratio. Its intended use case is, for example, rarely-used long-term archives that only need to be unpacked infrequently.
↗https://github.com/Xelitan/Free-Pascal-port-of-LIBZPAQ-Version-7.15
Licence: MIT, © 2026 Xelitan
Xelitan has also released Pascal ports for LZ4, LZ5, LIZ, and ZSTD.