7-Zip Explained

7-Zip
Developer:Igor Pavlov[1]
Released:[2]
Programming Language:Assembly, C and C++[3]
Operating System:Windows/ReactOS,[4] BSD, macOS, Linux,
Language Count:89
Language Footnote:[5]
Language:

Afrikaans, Albanian, Arabic, Aragonese, Armenian, Asturian, Azerbaijani, Bangla, Bashkir, Basque, Belarusian, Breton, Bulgarian, Catalan, Chinese Simplified, Chinese Traditional, Corsican, Croatian, Czech, Danish, Dutch, English, Esperanto, Estonian, Extremaduran, Farsi, Finnish, French, Frisian, Friulian, Galician, Georgian, German, Greek, Gujarati, Indian, Hebrew, Hindi, Indian, Hungarian, Icelandic, Ido, Indonesian, Irish, Italian, Japanese, Kabyle, Karakalpak - Latin, Kazakh, Korean, Kurdish - Sorani, Kurdish, Kyrgyz, Latvian, Ligurian, Lithuanian, Macedonian, Malay, Marathi, Mongolian (MenkCode), Mongolian (Unicode), Mongolian, Nepali, Norwegian Bokmal, Norwegian Nynorsk, Pashto, Polish, Portuguese Brazilian, Portuguese Portugal, Punjabi, Indian, Romanian, Russian, Sanskrit, Indian, Serbian - Cyrillic, Serbian - Latin, Sinhala, Vietnam, Slovak, Slovenian, Spanish, Swedish, Tamil, Tatar, Thai, Turkish, Ukrainian, Uyghur, Uzbek, Valencian, Vietnamese, Welsh, Yoruba

These translations are partial and for the user interface only. Help and documentations are in English.

Size:1.1–1.7 MB[6]
Genre:File archiver
License:LGPL-2.1-or-later with unRAR restriction[7] / LZMA SDK in the public domain

7-Zip is a free and open-source file archiver, a utility used to place groups of files within compressed containers known as "archives". It is developed by Igor Pavlov and was first released in 1999. 7-Zip has its own archive format called 7z, but can read and write several others.

The program can be used from a Windows graphical user interface that also features shell integration, from a Windows command-line interface as the command 7za or 7za.exe, and from POSIX systems as p7zip.[8] Most of the 7-Zip source code is under the LGPL-2.1-or-later license; the unRAR code, however, is under the LGPL-2.1-or-later license with an "unRAR restriction", which states that developers are not permitted to use the code to reverse-engineer the RAR compression algorithm.[9] [10]

Since version 21.01 alpha, preliminary Linux support has been added to the upstream instead of the p7zip project.[11]

Archive formats

7z

See main article: 7z.

By default, 7-Zip creates 7z-format archives with a .7z file extension. Each archive can contain multiple directories and files. As a container format, security or size reduction are achieved by looking for similarities throughout the data using a stacked combination of filters. These can consist of pre-processors, compression algorithms, and encryption filters.

The core 7z compression uses a variety of algorithms, the most common of which are bzip2, PPMd, LZMA2, and LZMA. Developed by Pavlov, LZMA is a relatively new system, making its debut as part of the 7z format. LZMA uses an LZ-based sliding dictionary of up to 3840 MB in size, backed by a range coder.[12]

The native 7z file format is open and modular. File names are stored as Unicode.[13]

In 2011, TopTenReviews found that the 7z compression was at least 17% better than ZIP,[14] and 7-Zip's own site has since 2002 reported that while compression ratio results are very dependent upon the data used for the tests, "Usually, 7-Zip compresses to 7z format 30–70% better than to zip format, and 7-Zip compresses to zip format 2–10% better than most other zip-compatible programs."[15]

The 7z file format specification is distributed with the program's source code, in the "doc" sub-directory.

Others

7-Zip supports a number of other compression and non-compression archive formats (both for packing and unpacking), including ZIP, gzip, bzip2, xz, tar, and WIM. The utility also supports unpacking APM, ar, ARJ, chm, cpio, deb, FLV, JAR, LHA/LZH, LZMA, MSLZ, Office Open XML, onepkg, RAR, RPM, smzip, SWF, XAR, and Z archives and cramfs, DMG, FAT, HFS, ISO, MBR, NTFS, SquashFS, UDF, and VHD disk images. 7-Zip supports the ZIPX format for unpacking only. It has had this support since at least version 9.20, which was released in late 2010.

7-Zip can open some MSI files, allowing access to the meta-files within along with the main contents. Some Microsoft CAB (LZX compression) and NSIS (LZMA) installer formats can be opened. Similarly, some Microsoft executable programs (.EXEs) that are self-extracting archives or otherwise contain archived content (e.g., some setup files) may be opened as archives.

When compressing ZIP or gzip files, 7-Zip uses its own DEFLATE encoder, which may achieve higher compression, but at lower speed, than the more common zlib DEFLATE implementation. The 7-Zip deflate encoder implementation is available separately as part of the AdvanceCOMP suite of tools.

The decompression engine for RAR archives was developed using freely available source code of the unRAR program, which has a licensing restriction against creation of a RAR compressor. 7-Zip v15.06 and later support extraction of files in the RAR5 format.[16] Some backup systems use formats supported by archiving programs such as 7-Zip; e.g., some Android backups are in tar format, and can be extracted by archivers such as 7-Zip.[17]

Some forks add more formats.

File manager

7-Zip comes with a file manager along with the standard archiver tools. The file manager has a toolbar with options to create an archive, extract an archive, test an archive to detect errors, copy, move, and delete files, and open a file properties menu exclusive to 7-Zip. The file manager, by default, displays hidden files because it does not follow Windows Explorer's policies. The tabs show name, modification time, original and compressed sizes, attributes, and comments (4DOS [[long filename#descript.ion|descript.ion]] format).

When going up one directory on the root, all drives, removable or internal appear. Going up again shows a list with four options:

Features

7-Zip supports:

Versions

Two command-line versions are provided: 7z (7z.exe), using external libraries; and 7za (7za.exe), which is a standalone executable containing built-in modules, but with compression/decompression support limited to 7z, ZIP, gzip, bzip2, Z and tar formats. A 64-bit version is available, with support for large memory maps, leading to faster compression. All versions support multi-threading.

Forks

Plugins

7-zip comes with a plug-in system for expansion. The official "Links" page points to many plugins written by TC4Shell, providing extra file support.[26]

Software development kit

7-Zip has a LZMA SDK which was originally dual-licensed under both the GNU LGPL and Common Public License,[27] with an additional special exception for linked binaries. On 2 December 2008, the SDK was placed by Igor Pavlov in the public domain.[28]

Security

On older versions, self-extracting archives were vulnerable to arbitrary code execution through DLL hijacking: they load and run a DLL named UXTheme.dll, if it is in the same folder as the executable file.[29] [30] [31] 7-Zip 16.03 Release notes say that the installer and SFX modules have added protection against DLL preloading attack.

Versions of 7-Zip prior to 18.05 contain an arbitrary code execution vulnerability in the module for extracting files from RAR archives, a vulnerability that was fixed on 30 April 2018.[32]

Versions prior to 23.0 also contained an arbitrary code execution vulnerability, fixed on 7 May 2023.[33]

Reception and usage

Snapfiles.com in 2012 rated 7-Zip 4.5 stars out of 5, noting, "[its] interface and additional features are fairly basic, but the compression ratio is outstanding".[34]

On TechRepublic in 2009, Justin James found the detailed settings for Windows File Manager integration were "appreciated" and called the compression-decompression benchmark utility "neat". And though the archive dialog has settings that "will confound most users", he concluded: "7-Zip fits a nice niche in between the built-in Windows capabilities and the features of the paid products, and it is able to handle a large variety of file formats in the process."[35]

Between 2002 and 2024, 7-Zip was downloaded 428 million times from SourceForge alone.[36]

The software has received awards, In 2007, SourceForge granted it community choice awards for "Technical Design" and for "Best Project".[37] In 2013, Tom's Hardware conducted a compression speed test comparing 7-ZIP, MagicRAR, WinRAR, WinZip; they concluded that 7-ZIP beat out all the others with regards to compression speed, ratio, and size and awarded the software the 2013 Tom's Hardware Elite award.[38]

See also

External links

Notes and References

  1. Web site: A Few Questions for Igor Pavlov . 2003-04-30 . Dr. Dobb's Data Compression Newsletter . 2023-03-28.
  2. Web site: History of 7-zip changes . 7-Zip 20.02 alpha . 8 August 2020. 8 August 2020.
  3. Web site: P7ZIP SourceForge . January 2016 . . 2016-03-07 .
  4. Web site: Tests for ReactOS 0.4.14.
  5. Options... dialog box of 7-Zip for Windows 21.00 alpha
  6. Web site: 7-Zip - Browse /7-Zip/16.00. SourceForge.net. Slashdot Media. 12 May 2016. 10 April 2016.
  7. Web site: 7-Zip License for use and distribution . Pavlov . Igor . 7-zip.org/ . 2010 . 2010-04-16 . https://web.archive.org/web/20100410171656/http://www.7-zip.org/license.txt. 10 April 2010 . live.
  8. Web site: P7ZIP . July 2022 . GitHub . 2022-07-06 .
  9. Web site: 7-Zip. Pavlov. Igor. 7-zip.org. 31 October 2012.
  10. Web site: 7-Zip – License for use and distribution. Pavlov. Igor. 7-zip.org. 31 October 2012.
  11. Web site: Upstream 7-Zip Adds Preliminary Linux Support . Larabel . Michael . 2021-03-12 . Phoronix . en. 2021-03-17.
  12. Web site: Diaz. Antonio Diaz . Lzip. LZip.NonGNU.org . 29 July 2010. https://web.archive.org/web/20100729135045/http://lzip.nongnu.org/lzip.html. 29 July 2010 . live.
  13. Web site: 7z Format. Pavlov. Igor. 7-zip.org. 16 April 2017.
  14. Web site: 7-Zip 2011 – TopTenREVIEWS. https://web.archive.org/web/20121025200631/http://file-compression-software-review.toptenreviews.com/7-zip-review.html. 25 October 2012.
  15. Web site: 7-Zip (home page) . https://web.archive.org/web/20020121054121/http://www.7-zip.org/ . 21 January 2002 . live . 7-zip.org . Igor Pavlov . Statement on compression performance very similar in January 2002 and April 2017.
  16. Web site: Pavlov. Igor. 7-Zip 15.06 beta release notes.
  17. Web site: How to extract files from a Nandroid Backup. Vijay. 11 May 2013. AJQI. 16 April 2017. 31 March 2017. https://web.archive.org/web/20170331134328/http://ajqi.com/how-to-extract-files-from-a-nandroid-backup/. dead.
  18. Web site: AES Encryption Information: Encryption Specification AE-1 and AE-2. 30 January 2009. WinZip.
  19. Web site: Atwood. Jeff. File Compression in the Multi-Core Era. Coding Horror. 28 February 2009 . 4 August 2017.
  20. https://sevenzip.osdn.jp/chm/cmdline/syntax.htm "Command Line Syntax"
  21. Web site: [ubuntu] GUI front end for 7-zip? [Archive] - Ubuntu Forums]. ubuntuforums.org.
  22. http://sevenzip.osdn.jp:80/chm/cmdline/switches/method.htm -m (Set compression Method) switch
  23. Web site: Milkys Homepage - 7-Zip with support for Zstandard, Brotli, Lz4, Lz5 and Lizard Compression . mcmilk.de.
  24. Web site: p7zip-zstd . p7zip-project . 4 May 2023.
  25. Web site: NanaZip: The 7-Zip derivative intended for the modern Windows experience . M2-Team . 6 May 2023.
  26. Web site: Links . 7-zip.org.
  27. Web site: Browse /LZMA SDK/4.23 . 2014-02-12 . SourceForge.
  28. Web site: LZMA SDK (Software Development Kit). Pavlov. Igor. 2013. 16 June 2013.
  29. Web site: Kanthak. Stefan. Executable installers are vulnerable^WEVIL (case 7): 7z*.exe allows remote code execution with escalation of privilege. SecLists.org. 8 December 2015.
  30. Web site: Kanthak. Stefan. Executable installers are vulnerable^WEVIL (case 14): Rapid7's ScanNowUPnP.exe allows arbitrary (remote) code execution. SecLists.org. 22 December 2015.
  31. Web site: Hart. Jon. ScanNow DLL Search Order Hijacking Vulnerability and Deprecation. Rapid7.com. 21 December 2015.
  32. Web site: A Vulnerability in 7-Zip Could Allow for Arbitrary Code Execution. cisecurity.org. 2018-05-01.
  33. Web site: 7-Zip 7Z File Parsing Integer Underflow Remote Code Execution Vulnerability. zerodayinitiative.com. 2022-08-23.
  34. Web site: 7-Zip file compression tool . WebAttack . Snapfiles.com . 2012-10-12.
  35. Web site: Review: 7-Zip file compression application. James. Justin. 10 November 2009. TechRepublic. 1–2.
  36. https://sourceforge.net/projects/sevenzip/files/stats/timeline?dates=2001-07-20+to+2024-02-01 7-zip file download stats
  37. Web site: SourceForge.net: 2007 Community Choice Awards. 15 June 2007. SourceForge. https://web.archive.org/web/20100326163008/http://sourceforge.net/blog/cca07/. 26 March 2010. live. 16 April 2010.
  38. Web site: Masiero. Manuel. Roos. Achim. 19 March 2013. Compression Performance: 7-Zip, MagicRAR, WinRAR, WinZip. 2021-04-25. Tom's Hardware. en.