Need help to compress files into ESP32
Need help to compress files into ESP32
Hi,
We are working on ESP32 Modules and SDK for our product development.
Right now, We are using Loboris SPIFFS component to create directory and files for our project requirement.
We have one requirement in which we need to compress files as well folders into single file and push it to cloud or local server as per requirement.
So, does ESP32 supports any inbuilt library or application to compress files and folders into single file? If not then would anyone suggest me to do it in beat feasible way.
In short, we need file and folder compression support for ESP32.
Let me know if need anything else or required more information for our requirements.
We are working on ESP32 Modules and SDK for our product development.
Right now, We are using Loboris SPIFFS component to create directory and files for our project requirement.
We have one requirement in which we need to compress files as well folders into single file and push it to cloud or local server as per requirement.
So, does ESP32 supports any inbuilt library or application to compress files and folders into single file? If not then would anyone suggest me to do it in beat feasible way.
In short, we need file and folder compression support for ESP32.
Let me know if need anything else or required more information for our requirements.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to compress files into ESP32
Hi Loboris or Espressif System Developers,
Do you have any update or information regarding this feature? is it possible to do into ESP32 SDK through external component?
Please suggest me best feasible option or solution for that.
Do you have any update or information regarding this feature? is it possible to do into ESP32 SDK through external component?
Please suggest me best feasible option or solution for that.
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to compress files into ESP32
Hi Loboris or Espressif Developer,
Is there any update regarding this?
Is there any update regarding this?
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to compress files into ESP32
As far as I know, there is no folder compression support or library for ESP32.
You could use zlib library to compress the files.
Here is the link to the zlib component I'm using with only the files needed.
There is no function in it to compress the directory, you will need to create your own function to commpress the individual files and the directory info and put them in the final file, same for the decompression.
There is a third party library contrib/minizip in zlib repository which may help with that.
You can also try to port libarchive to ESP32. It contains everything you need, but I haven't try to compile it.
Probably it would be easier to just recursively download all the needed files from the remote server.
You could use zlib library to compress the files.
Here is the link to the zlib component I'm using with only the files needed.
There is no function in it to compress the directory, you will need to create your own function to commpress the individual files and the directory info and put them in the final file, same for the decompression.
There is a third party library contrib/minizip in zlib repository which may help with that.
You can also try to port libarchive to ESP32. It contains everything you need, but I haven't try to compile it.
Probably it would be easier to just recursively download all the needed files from the remote server.
Re: Need help to compress files into ESP32
Hi Loboris,loboris wrote:As far as I know, there is no folder compression support or library for ESP32.
You could use zlib library to compress the files.
Here is the link to the zlib component I'm using with only the files needed.
There is no function in it to compress the directory, you will need to create your own function to commpress the individual files and the directory info and put them in the final file, same for the decompression.
There is a third party library contrib/minizip in zlib repository which may help with that.
You can also try to port libarchive to ESP32. It contains everything you need, but I haven't try to compile it.
Probably it would be easier to just recursively download all the needed files from the remote server.
Thanks for quick response.
Our requirement is to have few files into few folders which need to compress all together into single zip file and send it to cloud if have external connectivity.
It will be good if you had developed this type of example before using ESP32. So, provide it if you have that type of example
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to compress files into ESP32
Hi,
Have any one manage to uncompress zip in esp32 and extract to folder.
Kindly share your experience.
Thanks,
Naeem
Have any one manage to uncompress zip in esp32 and extract to folder.
Kindly share your experience.
Thanks,
Naeem
Re: Need help to compress files into ESP32
The third party library contrib/minizip does not build for esp32.
Re: Need help to compress files into ESP32
I managed to compile/build zlib with minizip.
It works to unzip file.
howver zipper is not working.
I tried this example
http://www.vilipetek.com/2013/11/22/zip ... iles-in-c/
It is not working for me on Windows 10 as well.
It works to unzip file.
howver zipper is not working.
I tried this example
http://www.vilipetek.com/2013/11/22/zip ... iles-in-c/
It is not working for me on Windows 10 as well.
Re: Need help to compress files into ESP32
Sorry, we hadn't did any work for that as our client dropped that requirement due to uncertainty of component present into ESP32 IDF at that time.
So, it will be good if you can continue and provide proper solution which might be helpful for others as well.
Let me know if you need any help regarding that or need any further support for that
So, it will be good if you can continue and provide proper solution which might be helpful for others as well.
Let me know if you need any help regarding that or need any further support for that
Regards,
Ritesh Prajapati
Ritesh Prajapati
Re: Need help to compress files into ESP32
I tried
https://stackoverflow.com/questions/113 ... ip-on-zlib.
It works on windows platform.
zipOpen just hangs on esp32 platform.
Unzip using zlib and minzip is working for me to Esp32 platform.
Any idea?
https://stackoverflow.com/questions/113 ... ip-on-zlib.
It works on windows platform.
zipOpen just hangs on esp32 platform.
Unzip using zlib and minzip is working for me to Esp32 platform.
Any idea?
Who is online
Users browsing this forum: Bing [Bot], Google [Bot], Majestic-12 [Bot] and 395 guests