开发者

c++ Compression library - Deflate or Gzip

开发者 https://www.devze.com 2023-01-04 05:55 出处:网络
I\'m looking for a useful compression library for c++ (on windows) I nee开发者_如何学God preferably Deflate or Gzip, and i need it to be compatible with .NET\'s System.IO.Compression.

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

I nee开发者_如何学God 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


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,


I used ZLib, it was compatible enough.

0

精彩评论

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