Answer the question
In order to leave comments, you need to log in
Why can't data compressed by gzcompress on the server be decompressed by gzuncompress on the local machine?
In a PHP program, the data is compressed on the server and transmitted along with the checksum to the client: $data = base64_encode(gzcompress($str));
The client checks the checksum and if it is correct, tries to decompress the data: $str = gzuncompress(base64_decode($data));
An error occurs: PHP Warning: gzuncompress(): data error
The most interesting thing is that the error occurs only when certain data is compressed.
The PHP versions on the server and local computer are different, maybe the gzcompress algorithms on the server and desktop are not the same?
What can be done?
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question