O'Reilly logo

Delphi Cookbook - Second Edition by Daniele Teti

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required