Чем отличается zip от 7z
Перейти к содержимому

Чем отличается zip от 7z

  • автор:

Archive, compression formats comparison

Compare features, compression ratio of archive formats

ZIP format features and performances

ZIP is a popular compressed file archiving format, mainstream on Microsoft Windows systems; ZIP file format specifications are maintained by PKWare which originally developed the format.

ZIP compared to 7Z and RAR formats
    ZIP compression is quite fast and it is not CPU intensive (for today’s standard) compared to competing standards as rar and 7z — it’s based on Deflate lossless compression algorithm (like in GZip format), alternatively Deflate64 or BZip2 based compression is possible, and supported by PeaZip — that makes ZIP format an ideal candidate for archiving large quantities of mixed types of data (i.e. performing a backup), when speed is more important than maximum compression, which is usually the case with today’s large disks and large, poorly compressible multimedia files.
  • ZIP support is nearly ubiquitous (i.e. most Linux distributions and Windows since XP have basic support for ZIP standard out of the box), making ZIP format the ideal choice when distributing files i.e. downloadable packages, mail attachments etc.

Formats based on ZIP standard
Many archive/package formats (i.e. JAR, XPI, APK etc) are based on modified ZIP standard, and can be consequently read by PeaZip.

ZIP vs RAR format comparison

ZIPX format features and performances

ZIPX is a new archiving format implemented in WinZip starting from 12.1 release, evolved from ZIP specifications with newer data compression algorithms — BZip, LZMA, PPMd and others.

Advantages and disadvantages of ZIPX format
It provides a compression ratio comparable with RAR format, but ZIPX compression / extraction is significantly slower than ZIP and marginally slower than RAR, in the range of operating with 7Z format.
So, while ZIPX is a more feature-rich and powerful compression format than ZIP, functionally it is not an 1:1 replacement of it, being slower and not yet supported by most third party utilities, an «issue» it shares with most of ZIP alternative formats.

TAR format features and performances

TAR is a pure-archiving format popular on Unix and Unix-like systems (often used for backup and for content distribution on those platforms).

TAR format comparison with other archive formats

It does provide only archiving (concatenate input data and metadata in a single output file), delegating functions as compression, encryption, parity/integrity check, to external software working in pipeline with TAR command output — so a direct comparison ot Tar with a compressed archive format like Rar or Zip is not directly possible,
Tar is often combined with a compression algorithm as GZip to save disk space occupation, originating a compressed tar archive TAR.GZ or TGZ (with zlib’s Deflate).
Combining tar with BZip2 (TAR.BZ2 or TBZ) allows to attain better compression ratio than Gzip, at expense of longer / more computing intensive compression and decompression, anyway BZip2 algorithm performances can be dramatically improved by multithreading.
XZ / LZMA compressed tar archives benefit of compression ratio comparable to 7Z file format, as it is employed the same LZMA/LZMA2 algorithm discussed in 7Z format paragraph.
Fastest compression / extraction, retaining compression ratio comparable with Gzip, can be obtained with modern Brotli and Zstandard compression algorithms, which are explained in detail separately.

7Z format features and performances

7Z is a modern, open source archive format, featuring AES encryption, native volume spanning, and high compression ratio (best one in mainstream formats), in many cases — depending on the properties of the input data — better than competing RAR and ZIPX formats.
The 7z archive format was introduced by 7-Zip on Windows platform and ported by p7zip team on Unix platforms.

Advantages of 7Z over other archive formats
Supported compression algorithms (LZMA/LZMA2, PPMd, BZip2) can take benefit of parallel computing on modern multicore CPUs, but 7Z is still a format chosen when higher compression, and not speed, is the primary goal.

7Z vs RAR, ZIP formats comparison

RAR format features and performances

RAR is a proprietary archive format introduced by WinRar for Windows platform, and ported to Linux (only as extractor) by the same Author, Eugene Roshal.
RAR extraction routines were also rewritten as Open Source software (PeaZip uses this Open Source RAR component from 7-Zip/p7zip project), but its original license however does not allow third party to create a RAR compressor.

Advantage of RAR over competing formats
RAR format advantages are better compression ratio than ZIP, built-in strong encryption, and error recovery capabilities with optional use of recovery records.
For all those reasons, and being one of the first ZIP alternative released, even being a proprietary format RAR is a very popular choice especially for file distribution over the web, where the error recovery capability is a welcome advantage over most of other file formats.

RAR vs ZIP comparison

ACE format features and performances

ACE is a proprietary archive format introduced on Windows platform by WinACE and ported to Linux as command line utility (extraction only) by the same Author of WinACE.
The format is currently less popular than in past years, it offers improved compression compared to ZIP, but not as powerful as for RAR, ZIPX, and 7Z formats.
Due to the commercial nature of the format no free software is available for creating ACE archives, but UNACE for extraction of ACE archives was made available as royalty free (for use and distribution) closed source software.
PeaZip features UNACE for Windows and Linux as external plugin on Add-ons page in order to keep the base PeaZip package free of closed source software (only software released under OSI approved licenses are included in the base package) and provide end users the ability of unpacking ACE archives.
UNACE plugin for PeaZip is available either as installable package or as compressed package to be installed by hand (recommended for PeaZip portable), and it’s free of charge.

Brotli and Zstandard compression performances comparison

Google’s Brotli and Facebook’s Zstandard are pure compression algoritms (as well as zlib’s Deflate and BZip2) meant to compress a single input file or data stream, and for archiving purpose are often combined with TAR in order to consolidate multiple input file in a single container.

Brotli and Zstandard compared to classic compression formats
Both Brotli and Zstandard projects aims to maximum compression and extraction speed, the main goal being near-real time lossless decompression of content being distributed over the network, reducing the latency, transmission time, bandwidth consumption, and compression / decompression overhead over traditional lossless compression algorithms (as zlib’s Deflate or Zopfli).
As file archiving formats, at lower compression settings both Brotli BR format and Zstandard ZST format outperforms for speed fast compressors like Gzip / ZIP obtaining comparable compression results, and at higher compression levels are both capable of providing a better than Deflate compression level, being comparable to BZip2 or even RAR / 7Z formats compression.
In a direct comparison at current level of development, on modern multicore CPU Zstandard is faster than Brotli if multithreading option for its ZSTD binary is enabled — while provided compression level is quite similar.

Comparative of archival and compression formats properties

ARC format (or WRC ) is a new, open source archiving format developed by Bulat Ziganshin for FreeArc archiver utility.
The format features strong but fast and memory efficient compression, comparable to or better than RAR an 7Z formats for most filetypes.
Noteworthy advantage of ARC format is support for recovery records (like RAR) , for attempting data repair in case of corruption of the archive, and strong encryption with AES, Serpent and Twofish (all up to 256 bit key size) and Blowfish.
Interestingly, ARC command line syntax is close to WinRAR one, allowing easy porting of scripts from one program to the other.
PeaZip offers a GUI frontend to create, browse, test, repair and extract ARC / WRC archives under Windows and Linux (on Gnome, KDE or other desktop environments).
ARC / WRC files can be currently be browsed only in flat mode (shows all objects in archive), but in any other aspect they can be handled as ZIP / 7Z files (see previous point).
Please note that ARC (or ARK) is also the extension of an archive format developed by SEA company (not subject of this comparative): it was of mainstream diffusion before the introduction of ZIP, and it has no connection with FreeARC’s ARC format. PeaZip does not support SEA ARC / ARK files.

PAQ, LPAQ and ZPAQ formats: families of experimental compressors developed by Matt Mahomey and contributors.
PAQ compression has very high computational requirements (memory, CPU time) if compared to mainstream compressors, but reaches the highest compression ratio presently possible . Most of top ranking compression algorithms (i.e. Hutter prize winners) belongs from PAQ family or are derived works, as well as used in high compression utilities like KGB Archiver, WinUDA, WinRK and Emilcont. Best choice when maximum compression is desired regardless speed and memory usage.
LPAQ is a «lite» version of PAQ, meant to be faster but providing lower compression levels; it is a compression only utility, so LPAQ-compressed files will feature a double extension, i.e. filename.ext.lpaq. In PeaZip if multiple files are sent to be compressed by LPAQ they will be automatically added to a TAR archive before, resulting in the double extension TAR.LPAQ.
ZPAQ is the latest evolution of the PAQ family, featuring backward compatibility, while PAQ and LPAQ doesn’t, so archives created with a PAQ/LPAQ version need to be extracted with the same version. PeaZip offers a GUI frontend to create, browse and extract many PAQ (PAQ8F, JD, L and O) and LPAQ (LPAQ1 and LPAQ5) archive types, under MS Windows and Linux (on Gnome, KDE or other desktop environments).

QUAD , BALZ , and BCM are very efficient ROLZ-based compressor developed by Ilia Muraviev, featuring high compression ratio and high extraction speed, due to the observation most types of end users are expected to routinely unpack data and rarely compress files.
All of those are single file compression formats, so compressed files will feature a double extension, i.e. filename.ext.quad.
In PeaZip, if multiple files are sent to be compressed by QUAD, BALZ or BCM they will be automatically added to a TAR archive before, resulting in the double extension TAR.QUAD,TAR.BALZ, TAR.BCM respectively. PeaZip offers a GUI frontend to create, browse and extract those types of compressed files, under Microsoft Windows and Linux (on Gnome, KDE or other desktop environments).

Read more on Wikipedia page about comparison of archive formatsWikipedia data compression comparative in terms of performances, maximum compression properties, advanced features and reciprocal advantages / disadvantages.
Useful online resources: PKWarestandard zip file features (creators of ZIP format), WinZipzipx file format advantages, 7-Zip7zip characteristics, WinRARrar file format standard, PAQHutter prize winner compressor algorithm Wikipedia entry, ZPAQjournaled file archiver, Google BrotliBrotli fast compression, ZstandardZstandard fast compression project pages.

Synopsis: Comparative of archive formats properties and performances. How 7Z, Brotli, RAR, ZIP, ZIPX, Zstandard and other archive types compare for best speed, compression, and features. Classic ZIP vs ZIPX, 7Z, RAR, and classic archive formats vs Brotli and Zstandard modern pure data compression formats. How ZPAQ compares with ohet compressors.

Topics: features comparison of 7z rar zip archive formats, comparison of compressed file formats

PeaZip > FAQ > Archive and compression formats comparison: RAR vs ZIP 7Z Brotli Zstandard

Zip / 7zip Compression Differences

I have a number of zip files that I need to distribute to users, around 130 of them. Each zip file contains a number of similar text, html, xml, and jpg files. In total, the zip files total 146 megabytes; unzipped, their contents total 551mb.

I want to distribute all these files together to users in as small a format as possible. I looked into two different ways of doing it, each using two different compression schemes, zip and 7zip (which I understand is either LZMA or a variant thereof):

  1. Compress all the zip files into a compressed file and send that file ( single.zip/7z )
  2. Compress the unzipped contents of the zip files into a compressed file and send that file ( combined.zip/7z )

For example, say that I have 3 zip files, A.zip, B.zip and C.zip, each of which contains one text file, one html file, and one XML file. With method 1, a single compressed file would be created containing A.zip, B.zip and C.zip. With method 2, a single compressed file would be created containing A.txt, A.html, A.xml, B.txt, B.html, B.xml, C.txt, C.html, and C.xml.

My assumption was that under either compression scheme, the file generated by method 2 would be smaller or at least the same size as the file generated by method 1, as you might be able to exploit efficiencies by considering all the files together. At the very least, method 2 would avoid the overhead of multiple zip files.

The surprising results (the sizes of files generated by the 7zip tool) were as follows:

  1. single.zip — 142mb
  2. single.7z — 124mb
  3. combined.zip — 149mb
  4. combined.7z — 38mb

I’m not surprised that the 7zip format produced smaller files than the zip format (result 2/4 vs result 1/3), as it generally compresses better than zip. What was surprising was that for the zip format, compressing all 130 zip files together resulted in a smaller output file than compressing all their uncompressed contents (result 3 vs result 1).

Why is it more efficient to zip several zip files together, than to zip their unzipped contents together?

The only thing I can think of is that during compression, the 7zip format builds a dictionary across all the file contents, so it can exploit similarities between files, while the zip format builds the dictionary per-file. Is that true? And even that still doesn’t explain why result 3 was 7mb larger than result 1.

Какой формат сжатия файлов лучше — 7z, zip или rar?

Какой формат сжатия файлов лучше — 7z, zip или rar?

На днях ко мне обратились с вопросом, какой тип архива лучше всего сжимает файлы? Я уже не раз встречал тесты-сравнения эффективности различных алгоритмов сжатия. Практически всегда в них побеждает 7z. Однако я решил не давать столь однозначный ответ. И вот почему: степень сжатия является не единственным критерием, позволяющим определить лучший тип архива.

На степень сжатия файла влияет и программа, которую используют для создания архива, и ее настройки, и особенности сжимаемого файла. Кроме того, я бы не стал упускать из вида удобство использования формата сжатия и степень его интеграции в операционные системы. Если мы сжимаем документ для отправки по электронной почте, то должны быть уверены в том, что получатель сможет без проблем распаковать его.

Маленький тест

И, все же, уменьшение объема файла — это основная функция архиватора. Поэтому я решил провести собственное сравнение алгоритмов. В серьезных тестах обычно испытывается работа архиваторов с файлами разных типов. А в самых продвинутых — еще и подыскивают оптимальные настройки. Я поступлю проще: сжимать буду папку с установленной игрой — ведь в ней находятся разные типы данных: и музыка, и графика, и документация, и исполняемые файлы. Настройки же программ-архиваторов я не буду изменять — именно так поступает большинство пользователей.

Итак, игра Bastion — объем папки 863 МБ:

  • Zip (интегрированный в Windows 8.1) — 746 МБ (86,4% от исходного объема);
  • Zip (WinZip) — 745 МБ (86,3%);
  • RAR (WinRAR) — 746 МБ (86,4%);
  • 7z (7-Zip) — 734 МБ (85%).

Игра Hotline Miami — объем папки 654 МБ:

  • Zip (интегрированный в Windows 8.1) — 316 МБ (48,3% от исходного объема);
  • Zip (WinZip) — 314 МБ (48%);
  • RAR (WinRAR) — 307 МБ (46,9%);
  • 7z (7-Zip) — 301 МБ (46%).

Таким образом, победителем в соревнованиях на сжатие файла, как я и предполагал, вышел 7z. Но стоит ли выбирать именно этот формат? Я думаю, далеко не всегда.

Интеграция и распространение

В конце концов, 7z не так уж и далеко вырвался вперед. Zip и RAR, буквально, дышат ему в спину. А какой из этих форматов без проблем «переварит» ваш компьютер или система того пользователя, которому вы передадите сжатый файл?

По степени распространенности лидирует Zip. Инструменты для работы с ним интегрированы в Windows и OS X. Большинство дистрибутивов Linux поддерживают Zip из коробки. В Chrome OS сразу после установки мы можем сжимать и распаковывать файлы в форматах Zip и RAR.

А что же 7z? Для работы с ним необходимо скачать и установить отдельное приложение. Пусть даже это и бесплатная программа, но стоит ли 1—2% от объема файла этой возни? А если вы передаете архив человеку, далекому от всего этого, то придется потратить уйму времени, чтобы объяснить ему, как поступить с файлом.

Поэтому я рекомендую использовать 7z только в той ситуации, когда действительно необходимо добиться максимальной степени сжатия файла. Можно еще поупражняться с настройками архиватора и уменьшить размер файла еще сильнее (но это обернется потерей времени на сжатие и распаковку, а также повысит риск потери данных).

Во всех остальных случаях, нам стоит выбирать Zip, как самый распространенный формат архивов. Пусть файл будет сжат чуть менее плотно. Зато его сможет создать и открыть любой пользователь, на любом современном компьютере.

Чем отличается zip от 7z

Ask Computer Science Questions And Get Answers! This subreddit is intended for questions about topics that might be taught by a computer science department at a university.

Excuse me if this is not the appropriate sub for this type of question. If it's not, could someone direct me to the right sub?

I sometimes have to zip up files at work for no other reason than to save space on my C drive. I've noticed that there are different extension options. If all I'm trying to do is save space without losing information, which is more appropriate? Thanks in advance.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *