Boost logo

Boost Users :

Subject: [Boost-users] boost iostreams zlib_compressor not compatible with zlib.NET
From: Johan Ditmar (johanditmar_at_[hidden])
Date: 2010-05-12 17:54:32


Hello,

 

I would like to send compressed data between my C# to a C++ application in ZLIB format. In C++, I use the iostreams::zlib_compressor/zlib_decompressor. In C# I am currently using the ZOutputStream available in the zlib.NET library. First of all, when I compress the same data using both libraries, the results look different:

 

1.boost::iostreams::zlib_compressor:

FF 13 49 48 00 00 01 00 01 00 00 00 63 61 60 60 F8 00 C4 C1 25 45 99 79 E9 23 87 04 00

 

2.zlib.NET (zlib.ZOutputStream):

FF 13 49 48 00 00 01 00 01 00 00 00 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 that is present in zlib.NET, but not in boost).

 

Furthermore, when I decompress data in zlib_decompressor that I compressed in zlib.NET, I am not able to read from the stream suggesting something is wrong. It does work when I try to decompress data compressed in the zlib_compressor.

 

Does anybody know what is behind this incompatibility and whether there is an easy solution?

 

Thank you,

 

Johan

 
                                               
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
We want to hear all your funny, exciting and crazy Hotmail stories. Tell us now



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net