Difference between revisions of "ZIP"

From TheAlmightyGuru
Jump to: navigation, search
(Software)
(Software)
 
(No difference)

Latest revision as of 15:54, 29 April 2024

ZIP is an archive file format designed by Phil Katz and Gary Conway in 1989. The format supports archiving multiple files while preserving directory structure, lossless compression, encryption, and a few other features. Default compression uses the proprietary Deflate algorithm, but several other algorithms can be used. Default encryption uses the proprietary ZipCrypto algorithm (which is now seriously compromised), but it can use others. The format is now quite dated, doesn't produce the best compression, and doesn't support file-spanning compression.

An over-simplified way to describe ZIP compression is that it finds repeated data in a file and replaces the repeats with pointers to the first instance of the data. For example, if the data were "This test is a test of testing tests." The data could be compressed to look like "This test is a 2 of 2ing 2s." where the number 2 indicates that it points to the second word in the sentence. The actual Deflate algorithm used by most ZIP files is much more complicated and works in multiple passes to achieve its compression. The basic algorithm starts with LZ style compression, then uses Huffman coding.

The format was designed in order to save Phil Katz's fledgling company PKWare after it was discovered his first product was built on stolen source code. Lawyers of System Enhancement Associates successfully proved the archive software Phil Katz was selling, PKARC, was built almost entirely from the source code of ARC. Unable to sell PKARC anymore, the ZIP format, and its Deflate algorithm were quickly designed to avoid lawsuits. Despite this, ZIP ended up being very similar to ARC.

Although it was not the first archive format, ZIP gained wide popularity in the early 1990s because of its shareware license and became the dominate archive format on bulletin board services and the World Wide Web. Even to this day, though it has been eclipsed in quality by many other compression formats, like 7Z, ZIP remains the most popular archive format in the world. The same compression used in ZIP is also used in PNG images, Java JAR files, all the document formats of Microsoft Office and LibreOffice, and many others, and ZIP files are supported natively by every major operating system.

Personal

When I started getting access to BBSes and the Internet in the mid 1990s, I started encountering ZIP files. It didn't take me long to get a good enough understanding of them to use them, but I was still completely baffled as to how they worked. I remember trying to re-zip a ZIP file and being confused as to why it didn't shrink even further. It wasn't until I was around 19-year-old or so that another programmer explained that compression works by identifying patterns, and it finally clicked with me. I started using WinZip when Windows became my primary OS, but I always hated the nagging messages to buy. I later started using a cracked version of WinRAR, but, once I saw 7-Zip and its new open 7Z format, I switched to that and have used it ever since. I now predominately use 7Z as my go-to archive format, however, I will still use ZIP when I send data to friends who don't understand 7Z and when uploading to Web pages that don't support superior formats.

Software

Program Platforms License Functions Notes
7-Zip Linux, Windows Free, Open Compress, Decompress, Edit Very configurable and easy to use. Compresses better than most. Supports dozens of other formats as well.
KZip Windows Free Compress, Decompress Command line only. Slower, but usually beats all other compressors by running a brute force on all possible combinations.
PeaZip BSD, Linux, Windows Free, Open Compress, Decompress, Edit Very configurable. Compresses better than most. Poor UI.
PKZIP MS-DOS Shareware Compress, Decompress, Edit The original program. Command line MS-DOS only, not friendly to work with.
WinRAR Windows Crippleware Compress, Decompress, Edit Only useful for creating RARs which have been surpassed by 7Z.
WinZip Macintosh, Windows Crippleware Compress, Decompress, Edit Not worth using.

Links

Link-Wikipedia.png