473,395 Members | 1,999 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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

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)
xsÉL-VÈ,.QHÍÌSI-. .)ÊÌKb{‰

(ZLib library C++)
xœsÉL-VÈ,.QHÍÌSI-. .)ÊÌ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,
Kirsten
Jul 17 '05 #1
0 2162

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Greg Bakken | last post by:
I am writing a python program that recieves 'compressed and encoded' strings from another piece of software. I can successfully uncompress and decode the strings via import base64, zlib def...
0
by: Tony | last post by:
Hello, Any assistance would be appreciated: As the subject suggests I am trying to gunzip files using the Compress::Zlib module. The following is basically the code that I am working with: ...
2
by: bissatch | last post by:
Hi, I am trying to create a simple form that, when submitted, will uncompress a string entered in a textarea using gzuncompress. The entire HTML is below: <?php if (isset($_GET)) {
1
by: Dennis Powell | last post by:
Does anyone have a successful implementaion of the zlib.dll in VB. Net they can show me. I'm writting a class encaplsulating zlib functionality and I keep getting a System.NullReferenceException...
1
by: DLPnet | last post by:
Hello all, I m not sure if it is the good newsgroup, please fu to the correct one if you know (already tried comp.compression with no answer) I m really knew to the use of the zlib in C++ to...
2
by: Rakshasas | last post by:
Hello everyone, Basically I just found about about zlib and php. For a long while I have been searching for a provider that allows zip compression through php scripts and now I have this...
4
by: Anonymous | last post by:
Slightly OT, but can't find a zlib specific ng - so hopefuly, someone can point out why uncompressed strings are not matching the original strings (lots of strange characters at end of string). ...
0
by: Bint | last post by:
Hello, I am trying to decompress some data in a file, from PHP. It's data that has been zlib-compressed on a handheld device and sent wirelessly to the PHP server. I can open the file and...
4
by: MZ | last post by:
Hello! I`ve tried to instal zlib library to use zip functions to pack files into zip archive. I don`t know how I have to configure zlib to make it work. I have built up php.ini file and...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.