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, this is the way.
The ZIP file format doesn't need presentation. However, some recap can be useful.
"ZIP is an archive file format that supports lossless data compression. A .ZIP file may contain one or more files or folders that may have been compressed... |