「FILE-ARCHIVER」- 归档 | Archiving | 压缩 | Compressing

认识

The traditional Unix archiving and compression tools are separated according to the Unix philosophy:

A file archiver combines several files into one archive file, e.g. tar.

A compression tool compresses and decompresses data, e.g. gzip.

These tools are often used in sequence by firstly creating an archive file and then compressing it.

Of course there are also tools that do both, which tend to additionally offer encryption, error detection and recovery.

组成

性质

构建

—— 该部分介绍获得 Compressing / Archiving 工具的方法。我们更加关注于使用其解决问题,而非工具本身的构造。

Tar

Gzip

Xz

Bzip2

Zlib

ZIP
zip 的压缩原理与实现

rar && unrar

Compression

  1. 7-zip

This archiving utility can compress files 30 to 70 percent smaller than WinZip can, and 2 to 10 percent smaller than most other zip programs. It includes encryption capabilities, self-extracting files, a powerful file manager and support for a wide variety of compression formats. Operating System: Windows, Linux, macOS

  1. ArcThemALL

ArcThemALL can compress to UPX, ZIP or 7Z formats and extracts 33 other types of archive files. It can also create self-extracting archives and includes AES-256 encryption capabilities. Operating System: Windows

  1. Keka

For macOS, Keka is a port of 7-zip. It also compresses to Zip, Tar, Gzip, Bzip2, DMG and ISO formats. Operating System: macOS

  1. PeaZip

Amazingly versatile, PeaZip can open more than 180 different types of archived files, and it writes to seven, including ZIP and 7Z. It also includes security features like strong encryption, encrypted password manager, two-factor authentication, secure delete and file hashing. Operating System: Windows, Linux, macOS.

应用

.tgz vs. .tar.gz

https://stackoverflow.com/questions/11534918/are-tar-gz-and-tgz-the-same-thing

I think in the old package repo days, .tgz was used because files on DOS floppies could only have three letter extensions. When this limitation was removed, .tar.gz was used to be more verbose by showing both the archive type (tar) and zipper (gzip).

They are identical.

参考

Archiving and compression https://wiki.archlinux.org/index.php/Archiving_and_compression

早期,我们一直纠结于 Archiving 与 Compressing 概念,导致我们对笔记分类十分不满。根据 Wikipedia / File Archiver 页面

In computing, a file archiver is utility software that combines files into a single archive file – or in less common cases, multiple files.

A minimally designed archiver might concatenate the content of files along with file name and length. A more advanced archiver stores additional metadata, such as the timestamps, file attributes and access control information. An archiver might compress input file content to reduce the size of the resulting archive.

所以,我们创建 File Archiver 分类,将所有归档与压缩工具放入该分类。