I have a zipped up file within a resource and am attempting to decompress this zip file. However I keep getting this exception...?
The magic number in GZip header is not correct. Make sure you are passing in a GZip stream.
byte[] zipFile = HTMLEditor.ZipTest.HTMLEditor;
string output = AppDomain.CurrentDomain.BaseDirectory;
var bigStreamOut = new System.IO.MemoryStream();
//Decompress
using (var bigStream = new GZipStream(new MemoryStream(zipFile), CompressionMode.Decompress))
{
bigStream.CopyTo(bigStreamOut);
}
Any ideas anyone? Currently using .Net 4.0 and don't really want to use external libraries?