问题描述
我正在考虑使用 7-Zip 格式来打包我的应用程序文件,因为它是一种非常紧凑且流行的格式.不过,我找不到有关如何使用 C++ SDK 的一些教程.我想要一些教我如何操作的教程:
I'm thinking about using the 7-Zip format to pack my application files since it's a very compact and popular format. I can't find some tutorials on how to use the C++ SDK, though. I'd like some tutorials that teach me how to:
- 从内存(缓冲区)而不是直接从磁盘打开存档.
- 将存档中的单个文件提取到缓冲区,而不是磁盘.
- 检查是否可以在存档中找到某个文件.
推荐答案
来自 LMZA SDK 文档:
From the LMZA SDK documentation:
ANSI-C LZMA 解码器
~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
请注意 ANSI-C 的接口LZMA SDK 4.58 中的代码已更改.如果你想使用旧的接口,你可以下载以前版本的 LZMA SDK来自 sourceforge.net 站点.
Please note that interfaces for ANSI-C code were changed in LZMA SDK 4.58. If you want to use old interfaces you can download previous version of LZMA SDK from sourceforge.net site.
要使用 ANSI-C LZMA 解码器,您需要以下文件:1) LzmaDec.h +LzmaDec.c + Types.h
To use ANSI-C LZMA Decoder you need the following files: 1) LzmaDec.h + LzmaDec.c + Types.h
LzmaUtil/LzmaUtil.c 是例子使用这些文件的应用程序.
LzmaUtil/LzmaUtil.c is example application that uses these files.
示例应用程序应该拥有您需要的一切,否则 7-zip 的实际源代码将拥有您需要的一切.还有一个用于 7-zip here 的 C++ 包装器,它应该可以简化许多所需的操作.
The example app should have everything you need, else the actual source for 7-zip will have what you need. There is also a C++ wrapper for 7-zip here which should simplify a lot of the needed ops.
这篇关于7-Zip:有什么好的教程吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!