zlib_decode

Supported Versions: PHP 5 >= 5.4.0, PHP 7, PHP 8
Uncompress any raw/gzip/zlib encoded data
<?php zlib_decode(string $data, int $max_length = 0): string|false
<?php             $decode = $contentEncoding && 'gzip' === strtolower($contentEncoding);



            if ($decode) {

                $result = zlib_decode($result);



                if ($result === false) {

                    throw new TransportException('Failed to decode zlib stream');