Search This Blog

Compress / DeCompress Files using C# (C# Extension Method)

Many a times we need to compress decompress xml file.
Mostly when we are using any web applications which contains good amount of data Files, it is better to keep then after compressing.

This will help in reducing storage cost.

Here I have created two static methods which extends FileInfo Objects to CompressIt and DeCompressIt Files.

These methods compress and decompress files at a same location adding & removing .gz file extention. These method does not overright file, instead creating a new file.
For further reference you can go to msdn GZipStream Class
Link Within Related Posts Plugin for WordPress, Blogger...
There was an error in this gadget