tar 格式替代方案

发布于 2024-08-18 17:55:20 字数 212 浏览 5 评论 0原文

我需要使用 ruby​​ 归档多个文件,但我需要以这样的方式归档它们,以便可以在不使用我的脚本的情况下提取它们(所以我需要流行的格式)。

tar 的问题是最大文件长度以及写入 tar 时随机文件访问的问题。

良好的纯 ruby​​ 库或 ruby​​ 绑定是非常需要的。

内置压缩将是一个很好的补充(所以我不需要在归档周围使用 zlib ruby​​ 绑定)。

I need to archive multiple files using ruby, but I need to archive them in such way that they could be extracted without using my script (so I need popular format).

Problems with tar are max file length and problems with random file access while writing tar.

Good pure ruby library or ruby binding is highly desirable.

Built-in compression would be a good addition (so i don't need to use zlib ruby binding around archiving).

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

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

发布评论

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

评论(2

最近可好 2024-08-25 17:55:20

Ruby Zip 非常稳定,我们用它来允许用户下载图像包。

Ruby Zip is very stable, we use it to allow users to download bundles of images.

-黛色若梦 2024-08-25 17:55:20

那么为什么不在

`tar -czf myarchive.tgz myfiles/*`

ruby​​ 脚本中使用类似的东西呢?如果他们有提取文件的可执行文件,那么他们肯定有命令行 tar 可执行文件。

So why not just use something like this

`tar -czf myarchive.tgz myfiles/*`

from inside of your ruby script? If they have the executable to extract the files, surely they have a command line tar executable.

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