To zip a file:
main.cs434 chars16 lines
To unzip a file:
main.cs438 chars16 lines
Note: The GZipStream
class provided by .NET framework is used to compress and decompress the file. The input file is read using a FileStream
and output file is created using another FileStream
. The CopyTo
method is used to copy the compressed or decompressed data to the output stream.
gistlibby LogSnag