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.
Unzip a file to memorystream using SharpZipLib
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Sam HobbsRank #107 · 20.5K reputationPosted Nov 13, 2009, 2:57 PM EST
Kirtan PatelRank #292 · 8.6K reputationPosted Nov 13, 2009, 4:40 PM EST
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 !!!");
}
}