You can try zipping after the file has been completely downloaded.
You could use some variation of a multi-dimensional array:
Byte()()....an array of byte arrays. Compress each byte array using the System.IO.Compression library. Send each byte array in sequence. It's probably the least complex solution to the puzzle...but it's not going to send them a zip of multiple files sadly.
If you want to get into complex (which
will produce a standard zip containing multiple files), there are a number of libraries out there to do the job. But none of them compare with a simple reference to an existing .NET framework library sadly.
This is the spec for zip files if you want to go through the whole process:
http://www.pkware.com/documents/casestudies/APPNOTE.TXT
Otherwise there's an open source library at which is released under GNU which means you can include it in any distributed software:
http://www.icsharpcode.net/OpenSourc...b/Default.aspx