cross-platform compress & decompress

Mark Brownell gizmotron at earthlink.net
Mon Dec 1 18:36:59 CST 2003


On Monday, December 1, 2003, at 04:15  PM, Monte Goulding wrote:

> Try compressing an decompressing the whole file to see if some stage 
> in your
> parsing is corrupting the compressed data. Richard's suggestion of 
> compress
> then base64Encode is also appropriate for binary data in an XML 
> document.
>
> Cheers
>
> Monte

I have tried compressing and decompressing the whole file as the first 
test. I tried compressing the data from a variable as a second test. 
I've looked at the same data in a text editor on both platforms and I 
did a comparison of charToNum() of the compressed data on both 
platforms. This was the exact same problem I had with blowfish I think. 
I solved it by constricting cross-platform data transfers to less than 
ascii 127; even though the data can represent up to ascii 255. My 
blowfish algorithm does it all as numerical values until the final 
rendering. I had to drop binaryEncode() & binaryDecode() in order to 
get numerical only results within the process. That's why I think it's 
something like upper ascii character values across platforms.

So can you compress this: "abcdefghijklmnopqrstuvwxyz1234567890" on a 
Mac, save it as binary on a Mac, and open & decompress it on a Windows 
machine? I need to see a basic text file that I can decompress on Mac & 
Windows. \ mb



More information about the use-livecode mailing list