I want to send compressed data between my C # to a C ++ application in ZLIB format. In C ++, I use zlib_compressor / zlib_decompressor, available in boost :: iostreams. In C #, I am currently using ZOutputStream, available in the zlib.NET library. First of all, when I compress the same data using both libraries, the results look different:
- promotion :: iostreams :: zlib_compressor:
63 61 60 60 F8 00 C4 C1 25 45 99 79 E9 23 87 04 00
- zlib.NET (zlib.ZOutputStream):
78 9C 63 61 60 60 F8 00 C4 C1 25 45 99 79 E9 23 87 04 00 4F 31 63 8D
(Note the 78 9C pattern, which is present in zlib.NET, but not in boost).
Also, when I decompress data in boost that I compressed in zlib.NET, I cannot read from the stream, assuming something is wrong. It works when I try to decompress compressed data in boost.
Does anyone know what is going wrong?
Thank,
Johan