Any examples of compress and uncompress files (zip or tar type file)??
compress and uncompress files (zip or tar file)
Hi,
We've not built a zip library into MoSync. One of the reasons for this is that they can be very memory hungry and won't work well on all the devices we support. You should be able to build zlib (zlib.net) on MoSync though, and I can help you if you want to do this.
Thanks
Could you give me some reasons why it wont work well on all the devices we support? for using the file compression functionality , we can reduce the data transmission size between mobile client and server in order to cut the cost of transmission in mobile network. It is also easy to arrange files in some points. Will be appreciated if you could give more comments on it.
Hi, the problem I was thinking of was heap size. Memory compression (particularly so) and decompression (less so) can consume a large amount of memory, with catalogues, indices and swap space. It depends on your target device, but if you want to support a Motorola PEBL, then you may find that there is very little memory left for you application.
It can reduce transmission size, I approach this by stripping down the amount of data I send into tight binary packages rather than verbose XML documents for instance.
Its all going to be down to the devices you want to support. If you're only targeting modern phones, then you will probably be alright. My point is that it is very difficult to predict the amount of memory you may need.
As I said, I can't see any reason why zlib won't build on MoSync, so try it. I'll help you out if you need it.
I am interesting in building zlib on MoSync.
Is anyone already done that?
I've never heard of anyone trying it - give it a go and let me know if there is a problem.
Hi, Sam
Is the fopen function in newlib still not working?
I successfully compiled the zlib using newlib. But, failed testing about fopen file...
Thx!
Have a look at some libraries here:
http://stackoverflow.com/questions/124239/fastest-c-file-compression-library-available
There are libraries that require no memory for decompression. e.g. UCL, miniLZO
This would also serve as a good unit test for the MoSync target platforms.