views:

47

answers:

2

Hello dear StackOverflow!

I'm looking for a useful compression library for c++ (on windows)

I need preferably Deflate or Gzip, and i need it to be compatible with .NET's System.IO.Compression.

Also if it will give me a decorator over a stream that would be great so i could do:

std::ostringstream stringStream;
CompressionStream cs(stringStream);
cs << object;
cs.flush();
magicalThingy.Send(stringStream.str());

Thank you

+1  A: 

I used ZLib, it was compatible enough.

Pavel Radzivilovsky
+2  A: 

Take a look on Boost.Iostream that provides such filter allowing to compress std::iostream to gzip or zlib formats (they acutally use zlib under the hood but have nicer interface).

These formats are standard so anybody (.Net too) should open them,

Artyom