Save space using System.Zip
Historically, Delphi contains the TZCompressionStream and the TZDecompressionStream to respectively compress and decompress streams of bytes using the
zlib format. These classes are quite useful but are quite low level, being simply a stream compressor. In this recipe, we'll use a high-level class to compress and decompress folders and files. It is quite limited in terms of possibilities (you can compress and decompress files and folders, nothing more) but is very simple to use. Just keep in mind that this class is very specialized, so if you need some compression library to work with network protocols or on the fly compression/decompression, don't use this. But if you need a no-brain solution to compress something, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access