Can you please look at implementing internal zip/unzip functionality? It would be really useful to be able to download a package with content updates in a single file and then decompress locally. This would go a long way to making Corona apps more network reliant.
I’ve been through Lua Wiki for compression. Most of the projects listed as pure Lua implementations are not - they rely on C binaries or source or just execute “unzip” from the command line.
Module Compress Deflate is the only one in pure lua but it only decompresses gzip, so it’s of no use if you want to package multiple files.
If anyone knows of a pure lua unzip/unrar/untar implementation that they’ve used please do share… [import]uid: 11393 topic_id: 4886 reply_id: 304886[/import]
While I realize that Corona may have been originally developed for games, any more general purpose or business app will often need to download data. Due to the obvious limitations of these mobile devices, it’s vastly better to compress the data before sending it down the pipe.
Thanks, Steve [import]uid: 23379 topic_id: 4886 reply_id: 23335[/import]
@Ansca: There seems to be much interest in local zip/unzip. Any official word on whether or not you’re looking at it or if it is possible? [import]uid: 11393 topic_id: 4886 reply_id: 39569[/import]
very important. i am waiting for a zip function, i need it so i can finish one of my projects. i have tried many different things to resolve this on my own but i haven’t been able to figure it out.
there is lots of documentation on this for lua, and should be very easy for the skilled team at anscamobile to implement it in a matter of hours.
very important. i am waiting for a zip function, i need it so i can finish one of my projects.
What does your data look like?
There are simple ways to achieve compression that don’t rely on the LZH methodology.
For my own files, I realised that much of the data was actually empty space.
A simple change to the storage method got that down to a byte for ‘empty’ as opposed to 16 bytes for ‘populated’
File size came down from 500K to 20K in many cases.
I once used 2byte lookups for common words or phrases to implement an adventure game: getting the text down from Mb to Kb.
So it may just take a look with different eyes… [import]uid: 108660 topic_id: 4886 reply_id: 93062[/import]
this works well, its a good solution thx kfiller and Danny for taking the time to find this and implementing it [import]uid: 89663 topic_id: 4886 reply_id: 93150[/import]
mine has nothing to do about file sizes but downloading an updating my ad module. before i just download a json file then go through it to download small-icons, large-icons, banners ect. i mostly wanted to bundle things together and download one file instead of 30 small files. i just assumed zipping them would be the easiest.
you are very much correct when you say ‘look with different eyes’ especially in programming there are so many ways to do one thing.
thx for the tips [import]uid: 89663 topic_id: 4886 reply_id: 93152[/import]