Stream Compression

Jan 6, 2011 at 3:07 PM


I need to create SQL Server Virtual Device to compress the SQL backup while writing it to disk. I need to meet the following requirements: Password protected archive file, fast compression and good compression ratio and support file size greater than 4GB.

The way VDI works is that the SQL Server will send chunk of data that the virtual device need to process before getting the next one.

I did some test by using the following compression algorithm with a 6GB backup:

DeflateStream : Fast, but not a good compression (compressed file size 4GB)

LzmaEncodeStream: Very slow (100 times slower then Deflate) Compression: no idea, I did not had the patient to wait for the result. Also there seems there is no way to add a password...

Is it normal that the LzmaEncodeStream is that slow? Even the test program is slow and the correction dome in July 2009 did not fix it.

I would like to use SevenZip for the compression and suggestion how to do it?

Thank you