So I have been using the method below to unzip .gz files and its been working really well.
It uses SharpZip.
Now I am using larger files and it seems to be trying to unzip everything in memory giving me : Insufficient memory to continue the execution of the program..
Should I be reading each line instead of using ReadToEnd()?
public static void DecompressGZip(String fileRoot, String destRoot)
{
using FileStream fileStram = new FileStream(fileRoot, FileMode.Open, FileAccess.Read);
using GZipInputStream zipStream = new GZipInputStream(fileStram);
using StreamReader sr = new StreamReader(zipStream);
var data = sr.ReadToEnd();
File.WriteAllText(destRoot, data);
}