ZLib: Use gzuncompress (PHP) after compress (C++)

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Hi @all,

today I have implemented the ZLib library (1.2.1) in my C++ project.
Using the function compress2(...) (Compression level 1) I have encoded
my string.

Then I wanted to uncompress the string with PHP on my server, but here
the error:
Warning: gzuncompress(): buffer error in ...

Now I tried the gzcompress function in PHP and found differences:

(ZLib library PHP)
xsL-V,.QHSI-. .)Kb{

(ZLib library C++)
xsL-V,.QHSI-. .)K

As you can they... in the middle (the string itself I think) the
compressed strings are identical. But the second byte and additional
ones differ. (header and footer of the compressed data?)

How can I solve this problem?

THX very much,

Site Timeline