Closed anywhereyang closed 1 year ago
Bit7zLibrary lib{ L"7za.dll" };
BitExtractor extractorSplit{ lib, BitFormat::Split };
extractorSplit.extract(L"C:\\Users\\Lenovo\\Desktop\\test\\Steam.7z.001", L"E:/steam/"); //extracting a simple archive
the exception is CLASS_E_CLASSNOTAVAILABLE ClassFactory cannot supply requested class
7z ver:Download 7-Zip 22.01 (2022-07-15): bit 7z :v3.1.5
Hi!
Your code is correct except for the DLL you're using: the 7za.dll
supports only the 7z format, so you cannot use it to extract Split
/multi-volume archives.
In your case, you should use the 7z.dll
, which supports all archive formats, including the BitFormat::Split
.
On this wiki page you can find a more detailed comparison table of all 7-zip DLLs.
Please also note that extracting a multi-volume archive produces a full single-file archive, which then you must extract again using another extractor with the corresponding archive format (i.e., your Steam.7z.001
will be extracted to a Steam.7z
file, which in turn you have to extract again with a BitFormat::SevenZip
extractor).
the full code:
Bit7zLibrary lib{ L"7z.dll" }; BitExtractor extractor{ lib, BitFormat::SevenZip }; BitExtractor extractorSplit{ lib, BitFormat::Split }; extractorSplit.extract(L"C:\\Users\\Lenovo\\Desktop\\test\\Steam.7z.001", L"E:/"); extractor.extract(L"E:\\Steam.7z", L"E:/steam/"); int c = 0;
new question :
. if the multi-volume archives size more than 200GB, it will produces a big temp file,,it is vexed
if the multi-volume archives size more than 200GB, it will produces a big temp file,,it is vexed
Yeah, unfortunately, this is a known limitation of the library (issue #92). I will definitely work on providing a more efficient API that doesn't require extracting the intermediate files. I hope to implement it in a future release of the library asap.
ok,tks
Feature description
any example ?
Additional context
No response
Code of Conduct