Compress files and streams in ASP.NET applications

This sample demonstrates how easy it is to compress files and streams in ASP.NET applications. First, you are prompted for a url. Once this is entered, all files (HTML, CSS, Images, etc) for this url are gathered (using the WebRequest/WebResponse .NET objects) and returned to the ASP.NET application as streams. These streams are then added to the Archive component. Once all files have been gathered, the files within the Archive component are compressed and returned to the user as an HTTP download. Statistics are displayed for the amount of compression for each file, and total compression of the archive.

This sample demonstrates basic file compression integration with a web application. The techniques demonstrated can be used for a variety of tasks. Automatically compress/encrypt all files uploaded with the <input type=file> mechanism. Dynamically archive file downloads before sending the content to the users browser.

Launch the WebArchive sample now.

If you are interested in this sample, be sure to see these links:

 Download the Folder Archive Sample Now!

Download PowerTCP Zip Compression for .NET Trial

See all samples for PowerTCP Zip Compression for .NET