Need help to compress files into ESP32

Ritesh
Posts: 679
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Need help to compress files into ESP32

Postby Ritesh » Mon Feb 12, 2018 6:19 pm

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.
Regards,
Ritesh Prajapati

Ritesh
Posts: 679
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to compress files into ESP32

Postby Ritesh » Tue Feb 13, 2018 3:47 am

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.
Regards,
Ritesh Prajapati

Ritesh
Posts: 679
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to compress files into ESP32

Postby Ritesh » Wed Feb 14, 2018 6:45 pm

Hi Loboris or Espressif Developer,

Is there any update regarding this?
Regards,
Ritesh Prajapati

User avatar
loboris
Posts: 495
Joined: Wed Dec 21, 2016 7:40 pm

Re: Need help to compress files into ESP32

Postby loboris » Wed Feb 14, 2018 8:00 pm

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.

Ritesh
Posts: 679
Joined: Tue Sep 06, 2016 9:37 am
Location: India
Contact:

Re: Need help to compress files into ESP32

Postby Ritesh » Thu Feb 15, 2018 4:08 pm

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.
Hi Loboris,

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

snahmad75
Posts: 355
Joined: Wed Jan 24, 2018 6:32 pm

Re: Need help to compress files into ESP32

Postby snahmad75 » Tue Jun 19, 2018 1:05 pm

Hi,
Have any one manage to uncompress zip in esp32 and extract to folder.
Kindly share your experience.

Thanks,
Naeem

snahmad75
Posts: 355
Joined: Wed Jan 24, 2018 6:32 pm

Re: Need help to compress files into ESP32

Postby snahmad75 » Wed Jun 20, 2018 8:36 am

The third party library contrib/minizip does not build for esp32.

Return to “ESP32 IDF”

Who is online

Users browsing this forum: Baidu [Spider], ESP_igrr and 10 guests