Code 1MemoryStream ms = new MemoryStream(); 2Response.ContentType = "application/octet-stream"; 3string strFileName = HttpUtility.UrlEncode("TestFileName"); 4Response.AddHeader("Content-Disposition", "attachment; filename=" + strFileName + ".zip"); 5 6zlib.ZOutputStream outputStream = new zlib.ZOutputStream(ms, zlib.zlibConst.Z_DEFAULT_COMPRESSION); 7 8string strInfo = "string"; 910byte[] buffer = new byte[strInfo.Length];11buffer = System.Text.Encoding.UTF8.GetBytes(strInfo); 1213outputStream.Write(buffer, 0, buffer.Length); 1415outputStream.finish();16outputStream.Close(); 1718Response.Clear();19Response.BinaryWrite(ms.ToArray());20Response.End();21