ESP32-DevKit-V1 - Unzipping a zip file (extracting files from a zip)

So I have tried multiple methods, unzipLib, mimiz, etc..

I am using FS and SPIFFS. No matter what I do, when I can not get zip file to be dumped/extracted.

Anyone had luck or use a specific method for this?

Decompress on ESP32:

  • Open the ZIP file stored in SPIFFS.
  • read and extract each file.
  • Save each extracted file back into SPIFFS, making them available for use in the application.

We will need a bit more information. Maybe even post the zipped file here to see if someone knows how to unzip it.

I have tried any zip file, even take .txt documents, .bin files, anything, create a .zip using 7zip or winrar. I can not seem to get the arduino to unzip the zip file and extract the documents into the spiffs

I am not too familiar with what you're trying to accomplish; however, a cursory Google search found this and it seems pretty comprehensive, perhaps you missed a critical step?

Yes, I have seen that. My issue is not the SPIFFS. When the SPIFF contains a .zip file and we want to extract the files in the .zip aka unzip the zip file.

Well, I don't know and I'm having a hard time understanding what you're trying to do and in what context. That may be my newbieness with ESP32 talking, in any case, you may want to post your entire sketch here (minus network credentials, of course) using code tags so that others here wiser than I might see what's going on.

I have a .zip file in my SPIFFS, I am trying to "unzip" the files inside of the zip file. Follow?

No different then you do it on Windows. Unzipping a zip file inside arduino.

Decompress on ESP32:

  • Open the ZIP file stored in SPIFFS.
  • read and extract each file.
  • Save each extracted file back into SPIFFS, making them available for use in the application.

After some googling i found this library which appears to support zip files and should be able to do what you want.

That said after i went to the Zip file wiki page, i realized that there are many different compression methods which are supported, and i am not sure which the library is supporting, but i guess it is a good place to start.

Where had you started yourself ? what code have you been trying to get to work. Please share what you are doing, because we are not all psychic on this forum. We need details.

Show your code, what you are trying to do does not sound possible.

Take a look at the library unzipLIB. NOTE it is for SD cards, so you will need to somehow fake it out with a SPIFFS environment rather than SD. Not sure if it is doable but looks like it's worth checking out.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.