开发者

Retrieve and zip up word docs from SQL Server

I have an ASP.NET app that uses a SQL Server 2005 database to store word documents. One of the application requirements is that when a user clicks a button, the system retrieves some number of word documents from the db, zips them up in memory and allows the user to save the zip file to disk.

Is there a zip library that provides the ability to zip up files in memory? The few that I've seen read from 开发者_高级运维the file system.

Any thoughts are greatly appreciated.

Thanks


you can use a GZipStream to do this. You can back it with a memorystream and write the bytes out to the response once they're compressed.


With SharpZipLib you can create in memory zip streams.


I've used DotNetZip to do something very similar. Light weight, easy to use, no problems encountered.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜