Wednesday, March 18, 2009

DeflateStream versus GZipStream


DeflateStream and GZipStream are the two compression classes that come standard in the System.IO.Compression namespace.  If you're looking for all out performance, DeflateStream is the answer.  According to msdn,

The GZipStream class uses the gzip data format, which includes a cyclic redundancy check value for detecting data corruption. The gzip data format uses the same compression algorithm as the DeflateStream class.

GZipStream is basically DeflateStream with some additional functionality and integrity checking. So if you only care about speed, DeflateStream will be faster.

1 comment: