PHP gzuncompress – 30 examples found. These are the top rated real world PHP examples of function gzuncompress extracted from open source projects. Stubs for PHP core and third-party extensions for auto-completion, or static analysis – schmittjoh/php-stubs. Lately when ever I try to call kint’s class function d() on new server installs I often get the error message: `Warning: gzuncompress(): data error.

Author: Kigalkis Dilmaran
Country: Jordan
Language: English (Spanish)
Genre: History
Published (Last): 19 April 2011
Pages: 73
PDF File Size: 15.51 Mb
ePub File Size: 2.89 Mb
ISBN: 970-4-45113-678-1
Downloads: 10112
Price: Free* [*Free Regsitration Required]
Uploader: Shakabar

Edit Report a Bug.

As I can see – everything is enabled. However gzuncompress thrown Warning: The problem could be that the outside compressed string has a CRC32 checksum at the end of the file instead of Adler, like PHP expects. He’s totally right, tested gzuncompreas myself. One way to uncompress zlib-compressed data that is in a file without first reading in the file and then gzuncompressing it maybe gzuncomress have memory problems doing it that way is to compile the zpipe.

The part of phpinfo output. VladaKatlinskaya “gzuncompress” works on the so called “zlib” format. Sign up using Email and Password.


There were no incorrectly tagged gzip streams. Email Required, but never shown. Which is why you may prefer to use PHPs curl functions even, which handle this automatically. Post Your Answer Discard By clicking “Post Your Answer”, you acknowledge that you have read our updated terms of serviceprivacy policy and cookie policyand that your continued use of the website is subject to these policies.


PHP Sandbox, test PHP online, PHP tester

Or you could just use the right decompression function, gzdecode. Note that gzuncompress may not decompress some compressed strings and return a Data Error.

Whereas “gzdecode” decodes gzip-wrapped data. Look at mario’s answer.

Example 1 gzuncompress example. Note that gzuncompress may not decompress some compressed strings and return a Data Error.

PHP code example: gzuncompress

Try with his code: By using our site, you acknowledge that you have read gzuncompress understand our Cookie PolicyPrivacy Policyand our Terms of Service.

Please ThumbsUp if this saved you a lot of effort and time. The gzuncompress function produces a data error, but the gzucompress can be successfully decompressed with other zlib decompressors. I realized this while decompressing some compressed string in a pdf file. If I’d download this file with my browser I can unzip it easily.


PHP tutorial: gzuncompress function

Actually those bugs caused raw deflate to be sent as zlib streams. That should be an easy fix.

See Also gzcompress – Compress a string gzinflate – Inflate a deflated string gzdeflate – Deflate a string gzencode – Create a gzip compressed string.

Hi, I got an alternative for those zipped strings that gzuncompress cannot extract. First echo normally outputs the compressed file with proper header gzuncomperss least first two bytes are correct. Do you know why gzuncompress function can behaves in this way?


Sign up or log in Sign up using Google. Post as a guest Name.

Sign up using Facebook. Why PHP’s gzuncompress function can go wrong? Stack Overflow works best with JavaScript enabled.