如何使用 7z sdk 提取 rar/zip 文件 (C++)?
我正在尝试编写一个小型的跨平台漫画书阅读器(Qt / C++)。我不在乎已经有什么,我知道有一些。
我的问题是我需要阅读漫画书格式,这些格式被重命名为 rar 和 zip 文件。
文档非常...不存在?根本不存在“hello archive”文档。 我该如何设置?
如果它可以更容易地假设我在任何特定的操作系统上,请这样做。为了开发工作,我经常在 Kubuntu、OSX 和 Win7 之间切换。
I'm trying to write a small, cross-platform comic book reader (Qt / C++). I don't care what's already out there, I know there are some.
My problem is that I need to read the comic book formats, which are renamed rar and zip files.
The documentation is very... nonexistent? There's no "hello archive" document anywho.
How can I set this up?
If It makes it easier to assume I'm on any particular OS, do so. I'm switching between Kubuntu, OSX, and Win7 constantly for dev work.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我一直在为 7zip SDK 开发一个简单的 C++ 包装器,您可以在此处找到它。它目前仅支持 Windows 和我的特定需求,但我很乐意进行一些更改和/或接受贡献。它可以使用 7z.dll 在几行代码中提取 7zip 和 Zip 文件。添加 RAR 应该不难,因为 DLL 支持它。
I've been working on a simple C++ wrapper for the 7zip SDK, which you can find here. It currently only supports Windows and the specific needs I had, but I'd be happy to make some alterations and/or accept contributions. It can extract 7zip and Zip files in a few lines of code, using the 7z.dll. RAR shouldn't be difficult to add since the DLL supports it.
7z 实际上应该附带命令行变体和 GUI 变体的源代码,您可以深入研究它们并查看它们如何进行压缩,否则您可以使用 unRar 并查看是否有任何示例(不幸的是,由于下载被阻止,我无法检查)。
浏览了一下 LMZA SDK,我发现了这一点:
7z should actually come with both source for a commandline variant and a GUI variant, you could dig into to those and see how they do the compression, else you could use unRar and see if that has any examples(unfortunatly I can't check due to the download being blocked where I am).
Poking around the LMZA SDK a bit I came across this: