7-zip files can be stored in "solid chunks" with multiple files to a chunk (the app itself lets you choose the size of each chunk.)
Because files in a chunk use data from previous files in the same chunk, the efficient way to extract them is to extract all the files in the chunk at the same time. But extracting all the files in the *archive* is unnecessary overhead if the caller isn't going to ask for all files.
So I would like some API to determine which files are in which chunk, so that we can ask for the appropriate ones and not have to extract the same files over and over.
Thank you for the nice feature request.
Do you know, how to do it with 7-Zip C++ API?
No idea at all, unfortunately.
At the moment we check if any solid chunks are present in the archive (I think there was a flag just for that) and then if any are present, we extract the entire archive. So we avoid unnecessarily double-extracting the same file, but we now extract files which aren't necessarily going to be used.