On Thursday 25 July 2002 16:13, you wrote:
> Hi Henrik,
>
> On Monday, July 22, 2002, 4:02:01 AM, you wrote:
>
> HMK> Did anyone make rebol's compress match the one used in gzcompress()
> with php?
>
> I  never  tried,  but maybe PHP's just adding the GZIP header that
> REBOL does not add?

It doesn't. At least thats what it says in the PHP documentation.

I've done some futher investigation and it turns out that rebol can indeed 
decompress some strings with specific characters. I believe the compression 
algorithm used in php and the one in rebol treats certain characters 
differently. I haven't been able to determine which characters.

All I can see is that the compressed data from PHP and Rebol aren't exactly 
the same in some cases (I used a piece of compressed php source code which 
fails to decompress in rebol). The length is the same, but using rebol's 
checksum command gives different results for each compressed binary.

A failed decompression gives:

** Script Error: Not enough memory
** Where: halt-view
** Near: decompress <variable name>

I tried all compression levels in PHP, and found that level 6 comes closest to 
what rebol will decompress.

I also found out that rebol pads the length of the original string as a 32 bit 
number on the end of the compressed data. PHP doesn't do that.

I guess I'll leave it alone for a while since I can't find a stable 
solution...

-- 
Regards
Henrik Mikael Kristensen


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to