cross-platform compress & decompress
Mark Brownell
gizmotron at earthlink.net
Mon Dec 1 20:47:17 EST 2003
On Monday, December 1, 2003, at 05:01 PM, Richard Gaskin wrote:
> There may be something else in the mix: RevNet has a lot of gzipped
> files
> from both platforms and this has not been reported as a problem there.
I'm using this on a Mac X:
put "abcdefghijklmnopqrstuvwxyz1234567890<>" into tankX
ask file "Save:" with "Untitled.txt"
put compress(tankX) into URL ("binfile:" & it & ".gz")
I get this:
ã KLJNIMKœ»Ã Œ…ÕÀ/(,*.)-+Ø®¨2426153∑∞4∞± d¥ÙÊ&
It will be fun to compare what comes through the list as ascii chars
for the result...
So I put this file on-line zipped and...
Wouldn't you know it, it works fine!
I used this on the Windows machine:
answer file "this"
put decompress(URL ("binfile:" & it )) into zap
put zap -- returns "abcdefghijklmnopqrstuvwxyz1234567890<>"
OK I've discovered a bug with me. I zipped me...
It turns out I was sending header data in the first line of the
compressed data. Once I dropped that it worked fine.
Thanks to all,
Mark
More information about the use-livecode
mailing list