Deva xFTP - Professional FTP client that integrated with Web Link Check, Sitemap Generator and HTML/xHTML Validator.
  Products | WinTar

Zip archive format


   Zip file format is a data compression and archive format. A Zip file contains one or more files that have been compressed to reduce file size, or stored as-is. The process of compressing the document(s) into a Zip file is also known as deep-packing. The Zip file format permits a number of compression algorithms, but as of 2009, only Deflate is widely used and supported.

   Zip is a simple archive format that compresses every file separately. Compressing files separately allows for individual files to be retrieved without reading through other data; in theory, it may allow better compression by using different algorithms for different files. A caveat to this is that archives containing a large number of small files end up significantly larger than if they were compressed as a single file (the classic example of the latter is the common tar.gz archive which consists of a TAR archive compressed using gzip).

   The format was originally created in 1989 by Phil Katz for PKZIP, and evolved from the previous ARC compression format by Thom Henderson. However, many software utilities other than PKZIP itself are now available to create, modify, or open (unzip, decompress) Zip files

   Zip files generally use the file extensions ".zip" or ".ZIP" and the MIME media type application/zip. Some software uses the ZIP file format as a wrapper for a large number of small items in a specific structure; when this is done a different file extension is usually used.

   The specification for Zip indicates that files can be stored either uncompressed or using a variety of compression algorithms, but Zip is generally used with Katz's DEFLATE algorithm, except when files being added are already compressed or are resistant to compression.

   The Zip file contents are files and directories which are stored in arbitrary order. The location of a file is indicated in the so called central directory which is located at the end of the Zip file. The files and directories are represented by file entries.

   Besides the file data each file entry is introduced by a local header with information about the file such as the comment, file size and file name. The central directory consists of file headers holding the relative offset of the local headers for each file.

   Due to the arbitrary order and the fact that the order of the file entries and the corresponding header references in the central directory may be different, the format is non-sequential.

   The Zip file format allows for a comment containing any data to occur at the end of the file after the central directory. Also, because the central directory specifies the offset of each file in the archive with respect to the start, it is possible in practice for the first file to start at an offset other than zero.

   This allows arbitrary data to occur in the file both before and after the Zip archive data, and for the archive to still be read by a ZIP application. A side-effect of this is that it is possible to author a file that is both a working ZIP archive and another format, provided that the other format tolerates arbitrary data at its end, beginning, or middle.

   This property of the Zip format, and of the JAR format which is a variant of Zip, can be exploited to hide harmful Java classes inside a seemingly harmless file, such as a GIF image uploaded to the web. This so-called GIFAR exploit has been demonstrated as an effective attack against web applications such as Facebook.

  WinTar can create/write and read/extract Zip archive files.

Related file formats


Copyright © 2007 Miscosoftware, Inc. All rights reserved.