在HBO的连续剧《硅谷》中,主角写了一个压缩率超高的文件压缩算法,开启了整个精彩的故事。
在现实中,从压缩率来讲,7z确实比常见的zip压缩率高一些,且同样免费开源,我们可以用更少的空间存放更多的东西,文件小了,传输时也能节省带宽,省时省力。
Windows平台使用免费7z

Mac和Linux平台使用7z
macOS安装
brew install p7zip
Linux 安装
# Ubuntu 安装
sudo apt install p7zip -y
# CentOS 安装
sudo yum install p7zip -y
压缩文件(以压缩文件夹test-7z-dir为test-7z-dir.7z为例)
7z a test-7z-dir.7z test-7z-dir


压缩后 5.83GB转换为4.94GB
解压缩文件
# 解压到当前目录
7z x test-7z-dir.7z


# 将文件解压到当前目录下的zhaoolee文件夹(注意-o后面无空格)
7z x test-7z-dir.7z -ozhaoolee


网友评论