Re: Decompressing a string with zlib problems

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



you have another problem - in that all these very specific strings
that you are posting could very well be being mangled in someway
because of the mail transport. in fact I doubt it comes thru in
way that makes it testable at all.

it doesn't help that googling for 'dcomzlib' brings up your own posts
as the first results. not very helpful.

interesting problem - sorry I can't help

Graham Anderson wrote:
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:
8
trak88øá    8Animation Media Handlergmhdle Alias Data Handleralis


The compressed output is:

the compressed string is:
??t?+p??g?M6P`?i?o<?Mf??w??}P??p|????3?~P??kd3?????~l??޲?g?<g?V?~}?? w"?????-??eE??Fs?0?4??"v?,?u??ˬgY??J???v?Y?E?o?f^?&????J`Y}JKsI6?6??A? _a??m6m???l6o?}ܠ???E?????Cә#?<~t??z?t??3?'
-??
   ?\1?6jtG?,b?n??y(?nZy 9?????L/d$CQ
                                            ѫ??x        ?
߯݌v< ?yU_??թ?d?? ڠzY???Q???k?????:O?????????0.??H?ʼng???-?o%SױN?R??jl????u?mfRC???? πnZy›îãäflªÉ5”9∑äøÙ∞L/d$CQ —´úßx ë ÛyU_Í·’©íd¶∆⁄†zY• ‚ Q∫ìÕkÓÈ∂Õ¶∑:OùÁÙ˙쪱–Ë0.¢ ÈìËHˆ≈âg±àé-Õo%S◊±N˚RêƒjlÈÒŒu˝mfRCÉöŒª
 ߯݌v


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux