ExtractFile slow for file further down in structure (.iso)

May 11, 2011 at 8:07 AM

I am experiencing an interesting problem with SevenZipSharp. I am using 7-zip to open an ISO (.iso) file (DVD image; get information from stream).

The structure of the file is as follows:

VIDEO_TS\
  VIDEO_TS.BUP          14.336
  VIDEO_TS.IFO          14.336
  VIDEO_TS.VOB          10.240
  VTS_01_0.BUP          40.960
  VTS_01_0.IFO          40.960
  VTS_01_0.VOB     165.945.344
  VTS_01_1.VOB   1.073.709.056
  VTS_01_2.VOB   1.073.709.056
  VTS_01_3.VOB   1.073.709.056
  VTS_01_4.VOB   1.073.709.056
  VTS_01_5.VOB     152.569.856
  VTS_02_0.BUP          18.432
  VTS_02_0.IFO          18.432
  VTS_02_0.VOB          10.240
  VTS_02_1.VOB      22.278.144

Now, the information I need is in the .IFO files. If I extract the VTS_01_0.IFO file (to file or to stream) it happens almost instantly. All good. However extracting VTS_02_0.IFO takes ages, at least 2 minutes. Somehow it looks as it has to go through the whole archive (4GiB+) to get to this file. Just for completeness, using the 7-zip executable both happen in a snap, there is no big delay for extracting the file at the end. The code used is below. Am I doing something wrong?

I am using the latest 0.64.3890.29348 version on a 64bit machine with .NET 3.5

SevenZipExtractor.SetLibraryPath("7z64.dll");
SevenZipExtractor zip = new SevenZipExtractor("file.iso");

MemoryStream s = new MemoryStream();
// VTS_02_0.IFO takes ages!
//zip.ExtractFile(@"VIDEO_TS\VTS_01_0.IFO", s);
//zip.ExtractFile(@"VIDEO_TS\VTS_02_0.IFO", s);