如果您是文件囤积者,那么文件压缩是您绝对必须了解的。尽管存储技术不断在快速进步,但效率从来都不是一件坏事。
更不用说,我们今天的许多文件标准使过去的文件标准相形见绌——我们过去在Napster上下载的 128 kbps MP3(MP3s)现在已被FLAC(FLACs)取代,其中一首歌曲可以是整个MP3专辑的大小。
我们中的许多人都有不想删除但也不需要立即动态访问的文件。这些可以是照片、视频、音乐等等。创建这些文件的存档可以减少使用的磁盘空间,从而提高性能。它还可以节省您的钱——如果您正确存档,您的 1 TB 外置硬盘会感觉更接近 2 TB!
学习压缩文件并不难,但是所有这些存档格式呢?压缩文件会将它们放在单个文件的“盒子”中,但该文件可以有很多不同的扩展名:ZIP、RAR、7Z、TAR、GZ——这些都是什么(GZ—what)意思?肯定有区别吧?
当然有!如果 PC 擅长一件事,它会为您提供选择,而在归档文件时,您有很多选择。在本文中,让我们讨论许多流行的压缩文件归档格式之间的区别(differences between the many popular compressed file archive formats)。
什么是 ZIP 存档?
WinZip是最早获得广泛普及的文件存档器之一,它允许用户将文件压缩为ZIP
存档。
以下是ZIP格式与其他存档文件类型的主要区别:
- 文件无需压缩即可存储。
- 存档中的每个文件都是单独压缩的。这允许使用不同的算法和更高的压缩比,但在压缩大量小文件时会带来较大的存档文件大小的缺点。
- ZIP 的基于密码的加密在 2003 年(添加AES(AES)时)之前一直很弱。
- 在扩展出现之前,所有内容都有 4 GB 的硬限制:未压缩文件大小、压缩文件大小和总存档大小。
- ZIP压缩速度更快,并且不像当今许多流行的替代方案那样占用大量 CPU。
- (ZIP)大多数Linux(Linux)发行版和所有版本的Windows (自 XP 起)都支持ZIP开箱即用。
什么是 RAR 存档?
WinRAR因其永无止境的“试用”期而闻名。30 天后,您会开始在WinRAR中收到一个弹出窗口,说明您的试用已结束,然后您可以...关闭。RAR以其开发者(RAR)Eugene Roshal的名字命名,是当今非常流行的存档格式。
以下是它与人群的不同之处:
- RAR允许将档案模块化成卷,这是一种存储大量文件的有效方式。
- 您也可以将文件压缩成单个块(实体格式)。
- AES 加密是标准的。
- 档案可以通过密码保护。
- 音频文件的压缩效率特别高(高达 90%)。
- RAR档案可以嵌入到其他文件中。您(Did)知道您可以在 JPEG 中隐藏 RAR 存档(hide a RAR archive in a JPEG)吗?
- 许多RAR提取例程已被重写为开源软件。
- (RAR)与其最大的竞争对手ZIP相比,RAR具有更好的整体压缩率。
什么是 7Z 存档?
毫不奇怪,7Z 存档格式是由Windows应用程序7-Zip引入的。那是1999年的事了!
7-Zip和一个用于读取 7Z 文件格式的库均在GNU 宽通用公共许可证(GNU Lesser General Public License)下公开提供。
以下是 7Z 的一些功能:
- 7Z 具有模块化和开放的架构,允许通过各种堆叠方法压缩、转换和加密文件。
- 文件可以按 2-10% 左右的比例压缩。
- AES 加密是标准的。
- 所有存档标头都被压缩。存档标头存储有关如何处理存档中的数据块的信息。
- 支持超大(数十亿 GB)文件。
- 支持的压缩算法(LZMA/LZMA2、PPMd、BZip2)可以受益于现代多核CPU(CPUs)上的并行计算。
什么是 TAR 存档?
TAR是(TAR)Unix和类 Unix(Unix)系统上最流行的存档文件格式
。重要的是要了解每个TAR只是一个存档文件。它与 GZ 配合使用,GZ 用于压缩文件,本身没有归档功能。他们一起创建了一个“tarball”文件(TAR.GZ格式)。
TAR支持接收压缩的HTTP
响应和发送压缩的请求,使压缩率最高可达 80%。这种归档格式最常用于跨Linux风格的备份和分发内容。TAR档案保存组权限、日期、目录结构和其他重要的文件系统信息。
如您所见,每种存档格式都有其优点和缺点 - 根据您要压缩的文件类型和存档目的明智地选择。压缩(Compression)比、速度和安全性都值得考虑,每种格式都有时间和地点!
Differences Between the Many Archive Compressed File Formats
If уou’re a file hoarder, file compressiоn is somеthing you absolutely must know aboυt. Although storаge technology contіnues to improνe at a rapid rate, efficiency is never а bad thing.
Not to mention, many of our file standards today dwarf those of the past—the 128 kbps MP3s we used to download on Napster have now been replaced with FLACs, where a single song can be the size of an entire MP3 album.
Many of us have files that we don’t want to
get rid of but also don’t need immediate, dynamic access to. These can be
photos, videos, music, and much more. Creating an archive of these files can
cut down on used disk space which can, in turn, result in better performance.
It can also save your pockets—your 1 TB external hard drive can feel closer to
2 TB if you archive properly!
Learning to compress your files isn’t very
hard, but what about all of those archive formats? Compressing files puts them
in a “box” of a single file, but that file can have so many different
extensions: ZIP, RAR, 7Z, TAR, GZ—what do these all mean? Surely there’s a
difference, right?
Of course there is! If there’s one thing PC excels at, it’s giving you options, and when it comes to archiving your files, you have many of them. In this article, let’s discuss the differences between the many popular compressed file archive formats.
What is a ZIP archive?
WinZip is one of the first file archivers that
gained widespread popularity, and it allows users to compress files as a ZIP
archive.
Here are the main differences that the ZIP format has over other archive file types:
- Files can be stored without
compression.
- Each file within the archive is
compressed separately. This allows for the use of different algorithms and a
higher compression ratio but comes with the drawback of a larger archive file
size when compressing a large number of small files.
- ZIP’s password-based encryption
was criminally weak up until 2003 (when AES was added).
- Up until extensions came around, there
was a 4 GB hard limit to everything: uncompressed file size, compressed file
size, and total archive size.
- ZIP compression is faster and not
as CPU-intensive as many of today’s popular alternatives.
- ZIP is supported by the majority
of Linux distributions and all versions of Windows (since XP) out of the box.
What is a RAR archive?
WinRAR became famous for its never ending “trial” period. After 30 days, you’d begin getting a popup in WinRAR stating that your trial had ended, which you could then just… close. RAR, named after its developer, Eugene Roshal, is an incredibly popular archive format today.
Here’s how it differs from the crowd:
- RAR allows for the modularization of archives into volumes, which is an efficient way to store massive files.
- You can alternatively compress files into a single block (solid format).
- AES encryption is standard.
- Archives can be protected by a password.
- Compression of audio files is especially efficient (up to 90%).
- RAR archives can be embedded within other files. Did you know you can hide a RAR archive in a JPEG?
- Many RAR extraction routines have been rewritten as open-source software.
- RAR has an overall better compression ratio when compared to ZIP, its biggest competitor.
What is a 7Z archive?
Unsurprisingly, the 7Z archive format was
introduced by Windows application 7-Zip. That was all the way back in 1999!
7-Zip and a library to read the 7Z file format are both publicly available
under the GNU Lesser General Public License.
Here are some of 7Z’s features:
- 7Z has an architecture that is
both modular and open, which allows compressing, converting, and encrypting
files via various stacking methods.
- Files can be compressed at ratios
around 2–10%.
- AES encryption is standard.
- All of the archive headers are
compressed. Archive headers store information about how to handle blocks of
data within the archive.
- Extremely large (billions of GB)
files are supported.
- Supported compression algorithms
(LZMA/LZMA2, PPMd, BZip2) can benefit from parallel computing on modern
multi-core CPUs.
What is a TAR archive?
TAR is the most popular archive file format on
Unix and Unix-like systems. It’s important to understand that each TAR is only
an archive file. It’s used in tandem with GZ, which is used to compress files
and has no archiving capabilities itself. Together, they create a
“tarball” file (TAR.GZ format).
TAR enables receiving compressed HTTP
responses and sending compressed requests, allowing compression ratios to reach
up to 80%. This archive format is most often used for backup and distributing
content across Linux flavors. TAR archives preserve group permissions, dates,
directory structures, and other important file system information.
As you can see, each archive format has its
pros and cons—choose wisely depending on the type of files you’re compressing
and the purpose of your archive. Compression ratio, speed, and security are all
worth taking into account, and there’s a time and place for each of these
formats!