Gzip and TAR
In addition to PKZIP and Microsoft CAB support, Abbrevia supports compressed ZLib streams, as well as the gzip and TAR formats.
The Deflate engine in Abbrevia is general purpose in that it makes no assumptions regarding the source of data to be compressed or final destination of uncompressed data; as such it may be used with other formats that make use of the Deflate algorithm for compression purposes.
In particular ZLib is a common method for adding compressed data to other file formats. The .PNG graphic format is a well-known example.
Abbrevia supports ZLib encoded streams via the
AbDfDec.pas::Inflate() functions. Deflate accepts a source stream and writes the compressed results to a destination stream as a raw deflate stream; Inflate reverses that. If the stream has the zlib compression header you can read or write it using the
TAbZLStreamHelper classes in
Gzip and TAR Support
Another use of the Abbrevia Deflate engine is in support of the gzip format. gzip is a common means for archiving files on Unix and Linux systems that also uses the Deflate algorithm for compressing data. You can learn more about gzip at the gzip web site.
In general, Abbrevia's gzip handling is handled transparently by the library's main archive components (AbZipper, AbZipKit, AbUnzipper) based on the file extension. You also have access to lower level classes for working with gzip data (files and stream) directly, if you need that additional level of control.
Note that you can use the Abbrevia's MakeSelfExe component on gzipped files as well.
TAR (an acronym for Tape ARchive) is another archive format common on the Unix and Linux platforms. TAR is not really a compression format in that it simply concatenates the files, as-is, along with some informational data.
In general Abbrevia's TAR handling is transparently handled by the main archive components (AbZipper, AbZipKit, AbUnzipper) based on the file extension. You also have access to lower level classes for working with TAR data (files and stream) directly if desired.
A common practice due to TAR's lack of compression and GZip's relative awkwardness with handling multiple files is to create a Tarball of the files and the GZip the TAR. Abbrevia's GZip and TAR handling functions also work with such files transparently.