Can't Decompress
Bill Marriott
wjm at wjm.org
Sat Apr 29 14:49:00 EDT 2006
I created a new stack with a single field and two buttons:
Button 1
--------
on mouseUp
put "D:\Desktop\Put It Here" into saveFolder
put "My Data File.xyz" into saveFileName
put "binfile:" & saveFolder & "\" & saveFileName into saveURL
answer saveURL
put fld 1 into URL saveURL
put compress(URL saveURL) into URL saveURL
end mouseUp
Button 2
--------
on mouseUp
put "D:\Desktop\Put It Here" into loadFolder
put "My Data File.xyz" into loadFileName
put "binfile:" & saveFolder & "\" & loadFileName into loadURL
put decompress(URL loadURL) into URL loadURL
put URL loadURL into fld 1
end mouseUp
I've put the stack up on RevOnline for you to try. User MerryOtter.
Clicking Button 1 saves a file that is compressed properly. (I can even
extract it with 7zip). Clicking Button 2 gives me the error:
Type: decompress: string is not compressed data
Object: Button 2
Line: put decompress(URL loadURL) into URL loadURL
What am I doing wrong? No matter what I do I can't get decompress to work.
Rev 2.6.1 on Windows XP. (I hope I'm not missing something basic like I did
with my last post...)
More information about the use-livecode
mailing list