Mattan360 0 Newbie Poster

Hi again!

I'm now working on a client, that will download my compressed file from the web server, downloading goes nice and easy, but when it comes to the line I marked, nothing happens!

Here is my code with the marked line:

byte[] data = new byte[size];
                stream.Read(data, 0, data.Length);

                MemoryStream ms = new MemoryStream(data);

                GZipInputStream gzipstream = new GZipInputStream(ms);
                FileStream fstream = File.Create(Path.Combine(installPath, file));
                byte[] decompressed = new byte[gzipstream.Length];
                gzipstream.Read(decompressed, 0, decompressed.Length); // Here everything stops

                gzipstream.Flush();
                gzipstream.Close();
                gzipstream.Dispose();

                fstream.Write(decompressed, 0, decompressed.Length);

                fstream.Flush();
                fstream.Close();
                fstream.Dispose();

It stops in the way that the processor goes up at about 50% and still nothing happens!
Please help!

EDIT: Forgot to mention that it's a Silverlight OOB App, and the decompressing is done using ICSharpCode