Hi All,
I have a scenario here, I need to unzip a file which contains some files in it. Here I have to extract(UnZip) that file into a memorystream directly with out extracting it into a folder or something. Unfortunately I couldn't find any source for me to unzip a file into a memorystream directly using SharpZipLib assembly. Any help would be greatly appreciated.
Thanks,
Kalyan.
Loading
Kirtan PatelPosted Nov 13, 2009, 9:40 PM
please check "Do you like this answer check box" if my answer helps you :)
using ICSharpCode.SharpZipLib.Zip;
private void button1_Click(object sender, EventArgs e)
{
string ExtractLocation = "";
FolderBrowserDialog fbd = new FolderBrowserDialog();
if (fbd.ShowDialog() == DialogResult.OK)
{
//Path to Extract
ExtractLocation = fbd.SelectedPath;
//Extract Zip File
FastZip fz = new FastZip();
fz.ExtractZip(@"D:\Test.zip",ExtractLocation, "");
MessageBox.Show("Extraction Complete !!!");
}
}
Sam HobbsPosted Nov 13, 2009, 7:57 PM