Odd issue with compress

Terry Judd tsj at unimelb.edu.au
Mon Mar 5 22:35:02 EST 2007


I've come up against a bit of an odd problem...

I'm doing some data modelling that requires me to create long encoded
strings using the md5digest function - by long I mean tens of thousands of
characters long. I then do a comparison of the strings using a distance
metric based on the individual and combined lengths of the strings after
they have been compressed using Rev's compress function.

This all seems to work nicely until the combined length of the strings
exceeds 65000 characters whereupon the compression fails. By fails, I mean
that if I concatenate two identical encoded strings of 32400 characters and
compress them I get a compressed length of a bit over 32400 but if the
strings are 32500 each the compressed length is a bit over 65000.

I've tried doing this with non-encoded strings and it seems to work fine so
I'm guessing it has something to do with the fact the the individual encoded
strings have very little internal redundancy (if that makes sense).

Does anyone have any idea what might be causing this 'problem'?

Cheers,

Terry...




More information about the use-livecode mailing list