Compressing and decompressing folder and files using GZipStream in C#

In this article, learn how to compressing and decompressing folder and files using GZipStream in C#.


How to compressing and decompressing folder and files in C#:

The namespace System.IO.Compression supports GZip and Deflate algorithms. There are two methods that compress and decompress a byte stream which you can get from your file object. You can substitute GZipStream for DefaultStream in the methods below to use that algorithm.

1. .NET Data Provider – Standard Connection with default relative path

1. Compress files and folders:

2. Decompress files and folders:



– Article ends here –

Recommended:   Convert Binary into Decimal in C#
Share this:

Kiran is a Software engineer by profession and Enthusiastic blogger, love to write articles on computer technology and programming. Reach him at kiran.troubleshootyourself@gmail.com.

We will be happy to hear your thoughts

Leave a reply

Troubleshootyourself
Logo