Unzip in lua

Hello experts,

i’m trying to use this unzip zzlib made in lua

https://github.com/zerkman/zzlib

but i get this runtime error:

module ‘bit’ not found:

Does anyone know ho to fix this?

thank you

do

I’m not sure you can use that library with Corona, however, if you visit https://marketplace.coronalabs.com and search for unzip, you will find we have a plugin for zipping and unzipping files in your Corona project.

https://marketplace.coronalabs.com/plugin/zip

Rob

Hello Rob i’m already using The plug in , but this plug in work async and I did not Find a way to show a Progress bar during The unzip operation. How i can accomplish this???

I don’t think you can get a callback which tells you how far along the process is.

What you could do is time how long the process generally takes and update your progress bar manually based on that, but only fill it to 95% to allow for when it takes longer than expected.

When you get the onComplete callback in the zip listener, set your progress bar to 100%.

I’m unzipping a 50mb zip file containing 250mb worth of data, and it only takes a few seconds.

Thank you Nick for your suggestion, but to estimate how long it take to unzip a file can be different  if the unzipping process is done on different devices.

In fact I was looking for an unzip library where I could be in total  control of the unzipping process.

Btw, i’ll put a progress bar as You suggest and overestimating the time, but i’m still looking for a better solution…that could be the zzlib library , here  only an expert can tell what  is this module missing and find a way to fix it…

I’ve solved using a lua emulation of missing bit library.

I’ll attach the bit.lua module if I get the permission to do it

Is the bit.lua module different than our bit plugin?

Rob

>Actually no… dahhh 

i did non know that this plugin exist, that was the solution!

I’m not sure you can use that library with Corona, however, if you visit https://marketplace.coronalabs.com and search for unzip, you will find we have a plugin for zipping and unzipping files in your Corona project.

https://marketplace.coronalabs.com/plugin/zip

Rob

Hello Rob i’m already using The plug in , but this plug in work async and I did not Find a way to show a Progress bar during The unzip operation. How i can accomplish this???

I don’t think you can get a callback which tells you how far along the process is.

What you could do is time how long the process generally takes and update your progress bar manually based on that, but only fill it to 95% to allow for when it takes longer than expected.

When you get the onComplete callback in the zip listener, set your progress bar to 100%.

I’m unzipping a 50mb zip file containing 250mb worth of data, and it only takes a few seconds.

Thank you Nick for your suggestion, but to estimate how long it take to unzip a file can be different  if the unzipping process is done on different devices.

In fact I was looking for an unzip library where I could be in total  control of the unzipping process.

Btw, i’ll put a progress bar as You suggest and overestimating the time, but i’m still looking for a better solution…that could be the zzlib library , here  only an expert can tell what  is this module missing and find a way to fix it…

I’ve solved using a lua emulation of missing bit library.

I’ll attach the bit.lua module if I get the permission to do it

Is the bit.lua module different than our bit plugin?

Rob

>Actually no… dahhh 

i did non know that this plugin exist, that was the solution!