lib7zres 工程是一读取由7z压缩文件做为资源包的库。
7z文件分析和解压缩采用 7Zip 的解压缩LZMA SDK开源版本源码。
JRES::IRes* jres = SEVENZRES::Create7zRes(true);
if (jres) {
if (jres->Open("test.7z", '\\')) {
char* buf = nullptr;
size_t bufsize = 0;
void* res = jres->LoadResource("skin\\ui\\index.html", &buf, bufsize);
if (res) {
//TO DO USE data of "buf"
rarres->FreeResource(res);
}
}
jres->Release();
}
JRES::IRes* jres = SEVENZRES::Create7zRes(true);
if (jres) {
if (jres->Open("test.7z", 0)) {
IStream* res = jres->LoadResource("skin/img/caotion.png");
if (res) {
//TO DO USE IStream interface methods of "res";
//For examples: <Seek>|<Read>|<Write> methods etc.
res->Release();
}
}
jres->Release();
}
Copyright (c) 2018-present, Jhuix (Hui Jin)