Compress and Decompress in C#.net

Hi Guys,
Just wanted to share a very simple code example to compress and decompress in c#.net.

Here it goes.




From File????
If you are trying to compress and de-compress a file then use this to read into a file.

To Read from File
byte[] rawData = File.ReadAllBytes(FileName);
To Write to a File
File.WriteAllBytes(filename,rawData)

Thanks,
Have Fun