I am having problems decompressing a zlib'd string located in a file.
In the file headers, the compression says that it is zlib.
But, when I 'gzinflate' the string, I get the error: gzinflate():
data error in <b
Is the below NOT a zlib or some strange variant ?
anyone know ?
g
<?php
$hex="C0636D7664000003DE789C95533B4E0331109D2408C44FA200125084568212D153
2040A2A02012120D05142636BB26B677659B20B8000D05D7E00674882B70000EC1018019
67974D365060E569C76F3CEF4D66BD008D779DA67D0050BA9F707CC2CBFDE43301A07E1A
5003FA956B6433BEDFFB89A87E6CD5011AF3DEB21EC667BE173C1BA567A156D67E7DFEC3
772207C086E0DEE1B32D94F36545AE1B6AEB4673C9308834FFE3BF031C227613AE2CE575
A2ACCBAC6759A6824AADF6BA769259E945B46FA4665EA626EA08948D0E99E14A60597D4A
4B734936B10E36AD188941CF5F61E5ED6D17361C6D98928E6C1606366FAD7DDCA08B92CC
4507CC0F19C0061F18B4B9159743D39923913C7E74FE827ADE74DEF1A133EDBF270A2DE7
C30C8B5C31BF366A7447F91F2C62EE6E909A7928B96E5A79071FDD948B8ADFBB13CCE435
D339B78A10BFF406B04C2F642443510BD1AB9CA77809910CF3057955155FEAE1D5A99264
A6C6DAA07A5915A50EE2CA51BA93CD6BEEE9B6CD1AA605B73A4F9DE7F4FA93BBB1D004E8
302EA21BE993E848F6C58967B1888E2DCD6F2553D7B14EFB5290C40E6A6CE9F0F1CE75FD
6D665243839ACE14BB0DCADFAFDD8C760000003C";
// Convert the hex to a string
$string = pack("H*", $hex);
//echo it
echo "the compressed string is:". "\r\n";
echo $string;
//decompress the string
$uncompressed =gzinflate($string);
echo "the uncompressed string is: ".$uncompressed;
?>
The Output SHOULD look something like this: