How to Compress Files in ASP.NET?

I don’t know How to Compress Files in ASP.NET. While net suffering I found one “”. Here I get some knowledge. Can anyone any other idea.
Asked Dec 08, 2014

If you are looking for a place to share your travel photos and stories, then try BigRoom.

'GZip object that compress the file
Dim myStreamZip As New GZipStream(myCompressedFile, CompressionMode.Compress)

'Write Back
myStreamZip.Write(myBuffer, 0, myBuffer.Length)
Me.lblResult.Text = """" + strName lblResult.Text = lblResult.Text + " was compressed &uploaded successfully."

What we do here is read the file into a stream, change its extension to the appropriate GZ ext, and compress using the GZipStream compression method.

Answered Nov 16, 2017

TIP: If it's not your answer to this question, please click "Leave a Comment" button under the question to communicate with the question owner.