Compress files and directories into zip file and put it into blob field What is the best way to do the following using SQL Server?


Compress all the files, folders and subfolders from a specific location (specified in a parameter in a stored procedure) - the server side
In the blob return the zipped file as bulkcolumn - client side


Is it even possible?
Does it need to be done in real time?  I would engineer the solution differently.


The client uses a stored procedure to write to a queue table with what needs to be compressed.
A script running on the server periodically checks the queue table and zips up everything that needs to be zipped up, marks it as complete and does whatever else needs to be done.