ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
ZIP (file format) - Wikipedia, the free encyclopedia

ZIP (file format)

From Wikipedia, the free encyclopedia

ZIP
Image:The Unarchiver zip.png
File name extension .zip
Internet media type application/zip
Uniform Type Identifier com.pkware.zip-archive
Magic number PK\003\004 or PK\005\006 (empty archive) (unless a bootstrap script is present)
Developed by Phil Katz
Type of format Data compression

The ZIP file format is a popular lossless data compression and archival format. A ZIP file contains one or more files that have been compressed, to reduce their file size, or stored as-is. A number of compression algorithms are permitted in zip files but as of 2008 only DEFLATE is widely used and supported.

The format was originally evolved by Phil Katz for PKZIP 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, notably WinZip, BOMArchiveHelper, KGB Archiver, PicoZip, Info-ZIP, WinRAR, IZArc, 7-Zip, ALZip, TUGZip, PeaZip, Universal Extractor and Zip Genius. Microsoft has included built-in ZIP support (under the name "compressed folders") in later versions of its Windows operating system. Apple has included built-in ZIP support in Mac OS X 10.3 and later via the BOMArchiveHelper utility.

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. Generally when this is done a different file extension is used. Examples of this usage are Java JAR files, id Software .pk3/.pk4 files, package files for StepMania and Winamp/Windows Media Player skins, XPInstall, as well as OpenDocument and Office Open XML office formats. Both OpenDocument and Office Open XML formats use the JAR file format internally, so files can be easily uncompressed and compressed using tools for ZIP files. Google Earth makes use of KMZ files, which are just KML files in ZIP format. Mozilla Firefox Add-ons are zip files with extension "xpi". Nokia's mobile phone themes are zipped with extension "nth".

Contents

[edit] History

[edit] Early history

The ZIP file format was originally created by Phil Katz, founder of PKWARE.

During the mid-1980s, System Enhancement Associates, a small company run by Thom Henderson, created a file archiving format called ARC, and a corresponding archiver (also called ARC) that could compress and decompress files into this format.[1] This program was released as shareware, with the source code included. The file format quickly became a de facto standard.[1] Soon afterward, Phil Katz released a compatible software package, known as PKXARC. Because it used hand-optimized assembly language, it was considerably faster than SEA's original implementation in C.

The competition from Katz did not please SEA, who sued Katz for trademark & copyright infringement, as well as copyright infringement as it alleged that Katz had plagiarised sections of the code. Katz lost the lawsuit and was forced to pay $62,500 to SEA to cover their legal fees. It was found during the court case[citation needed] that Katz had used SEA's ARC source code for the majority of the application but had only made code optimizations to increase speed. Primarily he changed the word length used by the algorithm from 12 bits to 13 bits resulting in a higher compression for typical binary files. As a result of the lawsuit, Katz changed the names of his utilities to PKPAK and PKUNPAK.

Katz then went on to create his own file format, which is known worldwide now as the ZIP format (commonly called a "ZIP file"). The ZIP format was more resistant to data loss than the ARC format because of redundant catalog storage; it also was more flexible than ARC, providing room for additional optional compression algorithms and future expansion. Along with the new format, PKZIP included at least one compression algorithm more efficient than any supported by ARC. Once PKZIP was released, many users abandoned ARC because of its slower speed and less effective compression, and because SEA alienated many by seeming to suddenly assert proprietary legal rights over the ARC file format after it had become widely used among the on-line community (similar in this respect to the later GIF patents controversy).

Katz publicly released technical documentation on the ZIP file format making it an open format, along with the first version of his PKZIP archiver, in January 1989.

The name zip (meaning speed) was suggested by Katz's friend Robert Mahoney. They wanted to imply that their product would be faster than ARC and other compression formats of the time.

[edit] Beyond the command line

In the mid 1990s, as more new computers included graphical user interfaces, more users were not comfortable with the command-line operation of PKZIP. Seeing an opportunity, shareware authors began pitching compression and archival programs with graphical user interfaces. Many of these used the ZIP format. WinZip was among the most popular. PKWARE also offered a graphical version of PKZIP. These programs were easier to learn than the older command-line equivalents, but users still had to learn a specialized tool with its own interface for file archival and compression.

In the late 1990s, various file manager software started integrating support for the ZIP format into their user interface. Even earlier, Norton Commander and its clones like Volkov Commander in DOS had started that trend, and that remains the norm for the "Commander-like" or Orthodox file managers like Midnight Commander for Linux and UNIX-like systems and Total Commander (previously Windows Commander) for Windows. The KDE file manager (kfm) supported the ZIP format very early; ZIP support was also first added to Windows Explorer with the Plus! enhancement package in Windows 98 and later included in Windows Me and Windows XP; ZIP format support is also built in the Mac OS Finder (as of Mac OS X, via the BOMArchiveHelper utility), the Nautilus file manager used by GNOME and the Konqueror file manager of newer versions of KDE. By 2002, all major desktop environments included ZIP file support in their file managers: a ZIP file is typically presented as a directory or folder, so that files are copied into and out of it in the same manner as any other folder and the compression is handled in a way largely transparent to the user. This has eliminated the need to learn a specialized tool and interface for file archival and compression.

[edit] Technical information

ZIP is a fairly 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. However 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 specification for ZIP indicates that files can be stored either uncompressed or using a variety of compression algorithms. However, in practice, ZIP is almost always used with Katz's DEFLATE algorithm, except when files being added are already compressed or are resistant to compression.

ZIP supports a simple password-based symmetric encryption system which is known to be seriously flawed. In particular it is vulnerable to known-plaintext attacks which are in some cases made worse by poor implementations of random number generators.[2] It also supports spreading archives across multiple removable disks (generally floppy disks, but it could also be used with other removable media).

New features including new compression and encryption (e.g. AES) methods have been added to ZIP in more recent times. WinZip developed AES based standard is used also by 7-Zip but some vendors use other formats.[3] PKWARE SecureZIP uses another format that enables AES Encryption, Digital Certificate (X.509) Encryption, Filename Encryption and File Authentication.[4]

The original ZIP format had a number of limits (uncompressed size of a file, compressed size of a file and total size of the archive) at 4GB. In version 4.5 of the specification, PKWARE introduced the "ZIP64" format extensions to get around these limitations.

The FAT filesystem of DOS only has a timestamp resolution of two seconds; ZIP file records mimic this. As a result, the built-in timestamp resolution of files in a ZIP archive is only two seconds, though extra fields can be used to store more accurate timestamps.

Since September 2007, the ZIP specification (APPNOTE.TXT) contains a provision to store file names using UTF-8, finally adding Unicode compatibility to ZIP.

The Info-ZIP implementations of the ZIP format adds support for Unix filesystem features, such as user and group IDs, file permissions, and support for symbolic links. The Apache Ant implementation is aware of them to the extent that it can create files with predefined Unix permissions.

The Info-ZIP Windows tools also support NTFS filesystem permissions, and will make an attempt to translate from NTFS permissions to Unix permissions or vice-versa when extracting files. This can result in potentially unintended combinations, e.g. .exe files being created on NTFS volumes with executable permission denied.

[edit] The format in detail

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.

Image:ZIPformat.jpg

[edit] Implementing a ZIP application

There are some useful development libraries which are available as open source contributions such as the GNU gzip project and Info-ZIP. For Java, the Java SE (Standard Edition) contains the package "java.util.zip"; Zip64File specifically supports large files (larger than 4GB) and treats ZIP files using random access, and the Apache Ant tool contains a more complete implementation released under the Apache Software License. There is also a no-cost .NET Library called DotNetZip available under a public license.

According to the PKWARE Inc. ZIP file format specification4 supports large files (more than 65000 entries and entries larger than 4GB). File encryption, and the possibility to span a ZIP file over multiple files are supported as well.

However, not all of these features are implemented by the known development libraries.

[edit] References

  1. ^ a b Controversy: Lawsuits: SEA vs. PKWARE. BBS Documentary Library. Retrieved on 2008-01-07.
  2. ^ Stay, Michael. "ZIP Attacks with Reduced Known Plaintext". http://math.ucr.edu/~mike/zipattacks.pdf
  3. ^ AES Encryption Information: Encryption Specification AE-1 and AE-2
  4. ^ Application Note on the .ZIP file format

[edit] See also

[edit] External links


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -