7-ZIP – Quality Opensource Compression

7-Zip File Manager Window Screenshot *** CONTENTS ***

1. General information
2. Basic and advanced usage
3. Analysis
4. Conclusion
5. Worth installing?
6. Relevant links


*** GENERAL INFO ***

* Overview

Apparently, Russians are committed to providing the world with great compression software. After Eugene Roshal and his WinRAR program (1993), it was Igor Pavlov’s turn to unleash a masterpiece upon computers worldwide with 7-Zip (1999).

The 7-Zip project is an opensource compression program that successfully competes with established leaders in this segment of the software market, namely WinRAR, WinZip and WinAce. It is not as widely known but, as you will see in the following article, it’s worth a look and may even win its place on your HDD.

Its default format for creating archives, 7z, based on the GNU LZMA method, yields excellent compression ratios, sometimes even better than RAR’s.

* Availability and licensing information

The current version of 7-Zip is 4.42, released on the 14th of May 2006 as a small-sized (818KB) handy installer. A Windows x64 download is also available, weighing in a bit more at 1.2MB. 7-Zip’s full source code can also be downloaded, an interesting reference for developers interested in compression techniques.

The command line version of 7-Zip has been ported to UNIX-like systems by an independent developer, under the name p7zip. Mac OS X users can also use EZ 7z, a front-end to p7zip.

Although 7-Zip is opensource and free to use for personal or commercial purposes, its further development can be supported by registering the program for US$20.

* Installation and initial configuration (wizards?)

The setup wizard is based on Nullsoft’s NSIS – a renowned opensource tool for the development of Windows installers. It is not digitally signed, so running it will trigger a warning for Windows XP SP2 users.

7-Zip can be installed silently, without any intervention from the user by launching the downloaded file with the parameters “/S /D=dir”, where “dir” is the program installation directory.

No options or other means of customization are exposed during the install process, which may cause some frustration for power users. On the other hand, this is good when you are so eager to try out the program that you can’t be bothered with details.

* Uninstallation info

The usage of NSIS provides a proper uninstall routine, accessible from the Add/Remove feature in the Windows Control Panel.


*** USAGE ***

* Basic Usage

Everybody works with archives nowadays. Even if you made last year’s resolution not working with them, you will occasionally stumble upon one or two, courtesy of your friends or co-workers. Yes, they love you very much and they know you like variety, that’s why you get all kinds of different formats, such as Zip, RAR and Ace. From time to time you’ll even get some strange sounding ones, like “tar” or “gz”. Luckily, you can rely on 7-Zip when the time comes to deal with these menacing files. It supports 7z, ZIP, GZIP, BZIP2 and TAR for both packing and unpacking, while RAR, CAB, ARJ, LZH, CHM, Z, CPIO, RPM and DEB are supported only for unpacking.

You may have noticed that the Ace format doesn’t fall in any of the above categories – that’s because it’s not supported at all, due to licensing issues or, as the author says in the online FAQ, “plug-in architecture incompatibility”.

Although not “true” archives, ISO files are quite frequently seen these days and it’s nice to be able to open them with just a (double)click. 7-Zip can’t really be blamed for not including this feature, but it has to be reminded that other similar programs, such as WinRAR, support it. ISO support is now available since 7-Zip 4.36 Beta.

7-Zip conveniently integrates into Windows Explorer’s right click menu, creating a “7-Zip” submenu with several options, configurable from the program’s settings dialog. The complete set of actions covers most operations that can be done on-the-fly with archives. The menu entries don’t come with icons next to them, which is not necessarily an issue, but would have helped more easily identify the 7-Zip submenu, especially if you have installed many other software products which add such menu entries.

Opening archives, extracting their contents in the current directory, the directory of your choice, or a subdirectory that takes its name from the compressed file, testing archives or compressing files are all actions that can be performed with a few clicks. A bit of meddling with the program’s settings allows for more actions such as testing an archive or compressing and then emailing one or more files. A small inconvenience is that the program does not take into account the type of the file being right-clicked on when displaying the context menu options, which allows for strange combinations such as the “Extract” option displayed for .doc files.

The “Add to archive…” option displays a dialog with various settings. The most important for basic usage are “Archive format” (7z, BZip2, Tar, GZip and Zip), “Compression level” (Store, Fast, Normal, Maximum, Ultra). The resulting archive can be split in several volumes, very handy for storing large archives on several removable storage devices. 7-Zip provides some standard values (Floppy, CD, DVD), but users can specify whatever fits their need for compression. The volume size is not necessarily fixed; if you want to store your data on two floppies and one CD, you can type “1.38M 1.38M 700M” in the appropriate field.

The splitting feature can be used on just about any file, even without compressing it, by selecting it in 7-Zip interface and clicking on “File -> Split file…”. You’ll have to specify the size of the resulting pieces and where to put them. It works quite fast and yields a series of files with automatically formatted extensions (.001, .002 and so on). 7-Zip helps with the reverse operation too. To re-combine some volumes, select the first file in the series and choose “File -> Combine files…”.

* Advanced Usage

Advanced users haven’t been left out; they can tweak away at several parameters, starting with some that control archive creation. For the 7z format, several “Compression methods” are available: LZMA, PPMd or Bzip2 (LZMA is recommended, for it provides the best compression ratio). Other settings include “Word size” (from 8 to 273) and “Dictionary size” (ranging from 32KB to 192MB, default 4M) which also influences the amount of memory 7-Zip uses when compressing and decompressing (for a dictionary size of 192MB, memory usage almost reaches 2GB).

Machines with more than one CPU (physical or virtual) can benefit from 7-Zip’s ability to use multithreading, which, according to the producer, “can speed up compressing speed up to 70-80% on Multi-Processor systems or up to 30% on Pentium 4 with Hyper-Threading.”

Archived data, including filenames, can be encrypted using AES-256; the encryption key is derived from the user-supplied password with the SHA-256 hash algorithm.

7-Zip also speaks SFX, although not quite fluently. Self-extracting archives can be created, but they cannot be split into multiple volumes (a work-around would be to split the resulting SFX archive and recombine it on the target system). There are no options to tamper with when creating SFX archives.

Basic installers can be created with 7-Zip but the procedure is too complicated compared to the results. It involves downloading the “extra” package which contains the 7z library, a plug-in for FAR, and additional SFX modules, preparing a standard .7z archive and a config.txt (with a special format, documented in the Help system), and finally running a something like “copy /b 7zS.sfx + config.txt + archive.7z archive.exe” from the command line. Long story short, it’s not worth it.

The program includes a benchmark tool which, according to the documentation, can be used to “measure value of the performance of your computer”. It basically simulates compressing and decompressing with a customizable (2-192MB) dictionary size and reports the speed (KB/s) and rating (MIPS) achieved by your machine. The dictionary size should be set carefully, as higher values can bog down your PC if you do not have enough free memory. The “errors” field should be watched carefully during the tests, as values greater than zero indicate possible problems with your RAM modules.


*** ANALYSIS ***

* User Interface

7-Zip’s user interface is fairly simple (menu, toolbar, address bar, directory contents and status bar), but it hides a secret: 2-panel mode, which transforms it into a simpler orthodox file manager.

Multiple language support is built right into the program, with most spoken languages available from the “Language” tab in the “Tools -> Options” dialog, without downloading any language packs or alternative installers.
The toolbar is not very customizable: you cannot choose what buttons are displayed, change their order or icon. The only options are “large buttons” (no thanks, not with those not-so-pretty icons) and show button text.

* Help system

The included documentation is based on the convenient HTML Help format (CHM) and is accessible from most of the program’s windows, the Help menu, or the F1 key. It is very well laid out and, although sometimes suffering from insufficient knowledge of the English language, does its job very well in explaining 7-Zip’s functions. The features of the CHM format contribute to this feeling, as a nice index and fast search engine are always handy when looking for help.

Also included is information about the command line version of 7-Zip: syntax, commands, switches and exit codes.

* Resource consumption

As with all compression utilities, 7-Zip hungers for CPU and RAM. In order to process your requests as fast as possible, it will use all the CPU you throw at it, but memory consumption is another story altogether. The amount of RAM used when compressing/decompressing depends on the dictionary size used when creating the archive. For the “normal” compression level, it ranges from 9MB (32KB dictionary size) to 1.8GB (192MB dictionary size).

Archiving the system32 folder (818MB) took 14 minutes at ~900KB/s compression speed and produced a 244MB archive. In the same test, WinRAR needed 7 minutes and yielded a 263MB file.

* Ease of use / Value

Most of the features offered by 7-Zip are easy to access and use. It also brings some interesting additions, such as the ability to split just about any file and recombine it later. The 2-panel user interface is really helpful if you’re the Total Commander type of user, even if it’s not enabled by default.

Format support is excellent, although it cannot work with .ace files at all and it has been reported that some Zip SFX archives cannot be opened. Besides the most common compression formats, 7-Zip also plays well with Linux packages such as RPM and DEB.

Unfortunately, some features seem incomplete, such as SFX archives, while others are too much of a burden to put in practice (7z installers). Still, taking into account that this package is free to use for both personal and commercial use, its value is quite considerable. 7-Zip is still in development, which lets us be confident that it will continue to be improved in the following releases.


*** CONCLUSION ***

* Best/outstanding feature

7-Zip’s shines where it should: compression. The 7z format combined with the LZMA method makes a powerful combination that can beat most formats in terms of compression ratio and even RAR in some situations. Security was not forgotten; AES-256 and SHA-256 are used for the encryption of .7z files.

Developers can also use 7z in their applications (for both compression and decompression) via the 7za.dll library and the LZMA SDK, available from the official homepage of the program.

* Worst issue

As many other opensource programs, 7-Zip brings forth innovation but suffers from incomplete implementation of some features. Luckily, the most important functions are not plagued by such problems and furthermore, the program is still in development, which means that the inconsistencies will be taken care of in the following releases.

* Final word

7-Zip provides excellent compression and good extra features, which recommends it not only to open-source enthusiasts, but to users (novice or advanced) that have a low budget or just prefer not to spend the money on a shareware equivalent. Give 7-Zip a try, you might just like it enough to make it a keeper.

WORTH INSTALLING? YES


*** RELEVANT LINKS ***

Official 7-Zip Homepage
Download 7-Zip

20 Responses to “7-ZIP – Quality Opensource Compression”

  1. Anonymous Says:

    Z-zip is unable to include empty directories whether used from the GUI or from the command line. What a piece of poo. How can anybody reasonably do backups like this?

  2. Anonymous Says:

    7-Zip to me is the most usefuland robust compression utility I know!! With fine speed with and EXTREMELY excellent compression ratio makes 7-Zip a must have on Windows and Linux/BSD alike!!

    By the way im using 7-Zip 4.43 Beta, and I use it for every bit of compression I do:)

  3. Anonymous Says:

    Simply the best! (In my opinion)

  4. Anonymous Says:

    “Z-zip is unable to include empty directories”

    What’s the use of adding empty directories??

  5. Alex S. Says:

    “What’s the use of adding empty directories??”

    This option is important if you want to do backups.

  6. Anonymous Says:

    I’ve used 7-zip as my main compression/extraction utility for the past 6 years. It’s solid, reliable, and just keeps getting better.

    Kudos to Igor Pavlov, Malodets!

  7. Manish Says:

    We create a self extacting exe by using this command “copy /b 7zS.sfx + config.txt + archive.7z archive.exe” . Now when I run archive.exe, if I want to pass a command line argument also, say I want to specify the name of y log file , say mylog.txt, how should I achieve that. and firstly is it possible?

  8. Alex S. Says:

    If you need to pass a parameter to the program that is to be run after the SFX is extracted, you can use the “ExecuteFile” and “ExecuteParameters” options in the config.txt file.

    EG:

    ;!@Install@!UTF-8!
    Title=”the title”
    BeginPrompt=”Do you want to install?”
    ExecuteFile=”myprog.exe”
    ExecuteParameters=”-l mylog.txt”
    ;!@InstallEnd@!

  9. Anonymous Says:

    I’ve been surfing the net and where can I find the command line usage for 7zip?

    If any of you know, please post at this page:
    http://en.qweki.com/7-Zip

    Thanks.

  10. Jesin Says:

    This should mention the fact that it uses its own implementation of DEFLATE (used in ZIP and GZIP), which ends up in a fully compliant file that can be decompressed by anything that decompresses DEFLATE, but it is capable of higher compression ratios.

  11. Krawhitham Says:

    Z-zip is unable to include empty directories whether used from the GUI or from the command line. What a piece of poo. How can anybody reasonably do backups like this?

    Yes you can

    use * not *.*

  12. tinram Says:

    Who wants to include empty directories? Like breathing a vacuum?

  13. Anonymous Says:

    Ditto the need for documentation of the ‘nix/command line versions. The man page hints, but never tells what the various options are

  14. Yo Says:

    I love that fact that 7Zip can extract from ISO files. The version that I am running (4.42) handles empty directories without a problem. Winzip didn’t! It could just be the defaults on my Winzip configuration, though.

  15. Alex S. Says:

    I guess that, since 2006, Igor found the time to fix the empty dirs thing :D

    BTW, 4.42 is kinda old already, why not upgrade to 4.64?

  16. Gilles Maisonneuve Says:

    Hello,

    Happy new year to all the forum members.

    I have a small question about 7Zip (latest toda4.64

  17. Gilles Maisonneuve Says:

    oops, I obviously have 2 left feet instead of two hands…
    I was saying with latest version to date 4.64 I am unable to delete files from a 7Zip archive inside subdirectories (2 levels).
    deleteion and update of existing files work with flat archives (no dir at all) or 1 level of directory, but it answers me “not implemented” (well actually “non implémenté” as it is in French) when having 2 directories.
    Example:
    Desktop - file p05.jpg –> P05.7Z (maximum or ultra w/ lzma) : I can update or delete file p08.jpg inside the archive
    Desktop - dir “New folder” w/ p05.jpg inside –(added to)–> Desktop\P05.7Z : it works fine, the same as above : update/delete
    Desktop - dir “New folder” w/ “Folder2″ inside w/ p05.jpg inside –> P05.7Z : I can add but cannot delete any more a file in that dir nor update it. (NB: I can still rename the file at the deepest dir level but can’t delete it any more)
    I can still update or delete the file at the above directory level.

    Questions : 1. bug or feature ? 2. If bug, will it be fixed soon ?

    Thank you all for your answers.

    gilles

  18. Alex S. Says:

    Did you by any chance create a *solid* 7z archive? (You can check this by looking at the “solid block size” parameter in the “Add to archive” windows).

    According to the help file, 7-zip is currently unable to modify the contents of solid 7z archives. “Non-solid” archives work fine though…

    Let me know if this helps.

  19. Dave B Says:

    7Zip 4.65 has great potential and already provides some useful features.

    However, it still falls short of other archiving applications in easy to use, basic features, such as adding and extracting to archives with full path structures. Sorry, but command line cd /D c: blah, blah… and UI “parameter” box kludges don’t cut it.

  20. Abugov Says:

    When is the “not implemented” bug (when trying to delete from solid archives) due to be fixed?

Leave a Reply