Decompress cross platform

Dar Scott dsc at swcp.com
Fri Oct 3 16:51:00 CDT 2003


On Friday, October 3, 2003, at 03:15 PM, J. Landman Gay wrote:

> It won't work for me. In re: your other note, there are no nulls and 
> the lines are not long; it is just plain ascii. So I don't think the 
> problem is with the source text, especially since I can reproduce the 
> problem no matter what I put in the field.

I mean the compressed data.  Starting at the fourth byte are some 
nulls.  And since it is binary, there is no reason why there might not 
be no Lf chars for well over the max line length.

Here is a hex dump of compress("abc"):

1f8b08000000000000034b4c4a0600c241243503000000

(Compression is only shorter for strings over, uh, about 25 bytes, I 
think.  A trick is to store strings less than 20 as uncompressed 
strings; you know whether to uncompress or not by the length.)

Dar Scott






More information about the use-livecode mailing list