KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I am using following code to zip a file and it works fine but when I decompress with WinRar I get the original file name without the extension, any clue why if filename is myReport.xls when I decompress I get only myReport ? using (var fs = new FileStream(fileName, FileMode.Open)) { byte[] input = new byte[fs.Length]; fs.Read(input, 0, input.Length); fs.Close(); using (var fsOutput = new FileStream(zipName, FileMode.Create, FileAccess.Write)) using(var zip = new GZipStream(fsOutput, CompressionMode.Compress)) { zip.Write(input, 0, input.Length); zip.Close(); fsOutput.Close(); } }
Tags (comma-separated)
Save Edits
Cancel