How to Compress Files in ASP.NET?

Hi,
I don’t know How to Compress Files in ASP.NET. While net suffering I found one “myasp.net”. Here I get some knowledge. Can anyone any other idea.
smithjames123
Asked Dec 08, 2014
'GZip object that compress the file
Dim myStreamZip As New GZipStream(myCompressedFile, CompressionMode.Compress)

'Write Back
myStreamZip.Write(myBuffer, 0, myBuffer.Length)
myStreamZip.Close()
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.

https://www.besanttechnologies.com/training-courses/dot-net-training


careenjoseph
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.

Categories