C++ 用于制作tar文件的c ++库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/4812837/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
c++ library to make tar files
提问by Lalith
Is there any c++ library available which can create tar files ? I have stream of text which I need to break into parts and make small files which should all reside in a tar ball !
是否有任何可以创建 tar 文件的 C++ 库?我有文本流,我需要将其分成几部分并制作小文件,这些文件都应位于焦油球中!
Regards, Lalith
问候, 拉利斯
采纳答案by Cody Gray
A quick Google search uncovers the Chilkat C/C++ TAR Library. A sample of its use is available here: Chilkat C++ Examples: Create TAR Archive
一个快速的谷歌搜索发现Chilkat C/C++ TAR 库。其使用示例可在此处获得:Chilkat C++ 示例:创建 TAR 存档
Another possible option is libtar(note, however, that it is a C library).
另一种可能的选择是libtar(但请注意,它是一个 C 库)。
And, of course, you could read the TAR file spec (all of what you need is linked through Wikipedia) and implement your own library. It looks like someone has already done that here, with the source available.
而且,当然,您可以阅读 TAR 文件规范(您需要的所有内容都通过Wikipedia链接)并实现您自己的库。看起来有人已经在这里完成了,并且提供了源代码。