<span style=”font-weight:bold;”>Here I will show you the easiest way to compress and Decompress (Gzip) a file using Asp.net with c#.
You can compress any file with this method.</span>
//Code Starts here
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
using System.IO.Compression;
/*
* http://helpindotnet.blogspot.com/
*/
namespace ConsoleApplication1
{
class GZipTest
{
private const int buffer_size = 100;
public static int ReadAllBytesFromStream(Stream stream, byte[] buffer)
{
// Use this method is used to read [...]
Filed under: asp.net c# | Tagged: compress a file, compress file, gzip, GZip Compress Decompress | Leave a Comment »


