GZ File
[Magic Home][Home]
This is a page for GZ file analysis. | |
File contents analysis |
Sample code
public string readfileZIP(string fname) { byte[] buffer = new byte[999999]; string s = "", responseFromServer = ""; int n; FileStream sourceFile = System.IO.File.OpenRead(fname); GZipStream input = new GZipStream(sourceFile, CompressionMode.Decompress, false); do { n = input.Read(buffer, 0, buffer.Length); if (n != 0) { System.Text.ASCIIEncoding enc = new System.Text.ASCIIEncoding(); string str = enc.GetString(buffer); responseFromServer += str; } } while (n > 0); return (responseFromServer); sourceFile.Close(); input.Close(); }