Hello,
I am new to LiveCode and I am struggling to using the revZip library.
Here is what I try to achieve :
I use the GET command to access a http URL.
I receive the answer to the GET command in the "IT" variable.
The Web server is sending me a zip stream (option" Content-Encoding"; "deflate" in the http header, this option is supported by almost all modern browsers).
I have tried to access this URL with Firefox and it works well, firefox deflates the data automatically.
I can't decompress this stream with LiveCode.
I have tried to store this stream in a binary file but the file is unreadable.
Anyone has an idea how to compress this stream ?
Thanks in advance.
revzip lib
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
revZipAddItemWithFile problems on Windows 7
I downloaded the Zip/Unzip stack at:
http://www.runrev.com/developers/lesson ... -zip-tool/
I modified it try to make it zip and unzip "empty" folders too.
It works on OSX (10.5.8 and 10.6.
but on Windows 7 it refuses to zip empty folders (it unzip fine).
Sometimes it crashes Livecode (5.5.3) if you put a directory to folder in the "pFile" (directory to the file).
What am I missing ?
I uploaded the stack in the UserSamples section under the name "TheRevZipper" if anyone can take a look...
Thanks
Trevix
http://www.runrev.com/developers/lesson ... -zip-tool/
I modified it try to make it zip and unzip "empty" folders too.
It works on OSX (10.5.8 and 10.6.

Sometimes it crashes Livecode (5.5.3) if you put a directory to folder in the "pFile" (directory to the file).
What am I missing ?
I uploaded the stack in the UserSamples section under the name "TheRevZipper" if anyone can take a look...
Thanks
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
Re: revzip lib SOLVED
As usual, after a night sleep, I found the solution:
for folders, I changed the "revZipAddItemWithFile" with a "revZipAddItemWithData", after having added a "local ProvVar" on the script.
Now works both on OSX and Windows 7.
Trevix
for folders, I changed the "revZipAddItemWithFile" with a "revZipAddItemWithData", after having added a "local ProvVar" on the script.
Code: Select all
repeat for each line tFolder in the folders
if tFolder is among the items of "./.." then next repeat
revZipAddItemWithData pArchive, pPrefix & item -1 of pFolder & "/" & tFolder & "/", "ProvVar"
MayBeError the result
addFolderToArchive pArchive, pFolder & "/" & tFolder, pPrefix & item -1 of pFolder & "/"
end repeat
Trevix
Trevix
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>
OSX 14.6.1 xCode 15 LC 10 RC1 iOS 15> Android 7>