I'm trying to unzip a zip file which is splitted to 5 parts. Problem is each part is in a different CD and i need to be able to change disks while unzipping. I have used Ionic.Zip to do that with no luck!
foreach (var entry in zip.Entries)
{
var stream = entry.OpenReader();
var buffer = new byte[readByte];
int n;
try
{
while ((n = stream.Read(buffer, 0, buffer.Length)) > 0)
{
fileStream.Write(buffer, 0, buffer.Length);
}
}
catch (FileNotFoundException ex)
{
// stream is closed and you cant continue
MessageBox.Show("Change CD");
while ((n = stream.Read(buffer,0, buffer.Length)) > 0)
{
fileStream.Write(buffer, 0, buffer.Length);
}
}
}
I have tried SevenZip, ZipSharp but i just cant implement it! Is there any way to handle this situation?