GZip 支持多部分文件压缩吗?

发布于 2024-10-16 15:03:54 字数 98 浏览 6 评论 0原文

我一直在寻找 Gzip 是否支持多部分文件压缩。从我到目前为止所看到的来看,它并没有,但是当选择 Gzip 作为压缩时,7z 为何允许分段压缩?这是否意味着 7z 在内部负责多分区?

I have been looking around if Gzip supports multi-part file compression. From what I have seen so far it does not, but how come 7z allows multipart compression when Gzip is selected as the compression? Does this mean 7z takes care of multi-partitioning internally?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

过去的过去 2024-10-23 15:03:54

Gzip 不支持多部分存档,但您仍然可以使用 split 创建它们:

split -–bytes=20m /path/to/large/archive /path/to/output/files

现在,要将其重新组合在一起,只需将各个部分 cat 合并为一个

cat files* > archive

:我可以看出,这就是 7-zip 在创建档案时所做的事情。它可能会添加一些标头信息,但它基本上只是将 20mb 的数据转储到文件中,并在名称后面附加一个数字。然后,在内部,它只是组装各个部分并将其作为存档读取。

Gzip doesn't support multipart archives, but you can still create them using split:

split -–bytes=20m /path/to/large/archive /path/to/output/files

Now, to put it back together, just cat the parts together into one:

cat files* > archive

As far as I can tell, this is what 7-zip does when creating archives. It might add some header information, but it basically just dumps exactly 20mb of data into a file and appends a number after the name. Then, internally, it just assembles the parts and reads that as an archive.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文