Hi Folks,
I asked this a little while back and was referred to the revZip functions, however after reviewing the documentation (there does not appear to be much beyond what is in the dictionary) and playing with the functions I'm not sure this is the way to go. The revZip functions seem to only work with file based zip archives, my data is in a buffer read from a network socket, and has been zip deflated by the server I get it from. I did try writing the following with my data:
put "/my/path/to/archive.zip" into tArchive
revZipOpenArchive tArchive, "write"
revZipAddUncompressedItemWithData tArchive, "myZippedItem", "thePayload"
revZipCloseArchive tArchive
revZipOpenArchive tArchive, "read"
revZipExtractItemToVariable tArchive, "myZippedItem", "tDeflated"
However it's still compressed after extracting to tDeflated. If anyone has experience using these functions, I could sure use some help. It is hard to believe that there is no interface beyond revZip to the libzip library. I am trying to translate a perl script to LiveCode and give it a GUI. This whole deflate business takes one line in the perl script, using their Compress::Zlib interface.
I did stumble across a site on github where there perhaps appears to be some integration work being done by RunRevMark at: https://github.com/runrev/livecode-thir ... ter/libzip, If anyone knows more about this I would really like to know if there are any plans to extend the LiveCode interface to the libzip library.
If I am unable to figure out how to inflate this network read data it may be a deal killer and my boss will have me using Adobe Air or something. Any help would be greatly appreciated.
Thanks,
Daryl
Inflating ZIP Deflated data string
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 78
- Joined: Wed Apr 10, 2013 9:08 pm
Re: Inflating ZIP Deflated data string
Did anyone get anywhere with this? I am having the same problem.
Returning to try to learn livecode again.
But much greyer at the temples than the last time.
But much greyer at the temples than the last time.
Re: Inflating ZIP Deflated data string
Did you read this: http://livecode.wikia.com/wiki/Compressing_%28zip%29 ?
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
-
- Posts: 78
- Joined: Wed Apr 10, 2013 9:08 pm
Re: Inflating ZIP Deflated data string
Managed to get my problem sorted.
Was not a zip problem. Just needed to decompress file.
in this thread. http://forums.livecode.com/viewtopic.php?f=7&t=16602
Was not a zip problem. Just needed to decompress file.
Code: Select all
put decompress (it) into tHtmlpage
Returning to try to learn livecode again.
But much greyer at the temples than the last time.
But much greyer at the temples than the last time.