tobozo / ESP32-targz

🗜️ An Arduino library to unpack/uncompress tar, gz, and tar.gz files on ESP32 and ESP8266
Other
123 stars 16 forks source link

Unable to untar #6

Closed m2sarmadi closed 4 years ago

m2sarmadi commented 4 years ago

I have a .tar file that contains files with the following size(bit): 403,000 and 728 and 342,548 and 132,795 and etc. (most file formats are .js) It works fine when I start untaring it, but when it gets to a specific file it gives the following error : Could not open [fileName] for write And then the untaring of the rest of the files is also ignored. I am sure that this particular file is not a problem because it is untar alone in another sketch.

tobozo commented 4 years ago

I can only think of a filesystem limitation here e.g. there's a 32 characters (path+filename) limit to FS.h, or the size of the tar + uncompressed content exceeds the partition size.

How many files are there in this tar archive and how deep is the folder structure in the tar ?

m2sarmadi commented 4 years ago

22 file are in tar archive and this files are in root of tar archive The total size of the tar aechive is 1.2 M.B Probably a problem with SPIFFS size

tobozo commented 4 years ago

yup I just discovered there are many filesystem sizes in the SDK menu :sweat_smile:

image

tobozo commented 4 years ago

@m2sarmadi did you get better results with smaller archives or should I keep this issue open as a bug ?

Since the WebServer component can serve gz contents, maybe minify+concat+gzip'ing your css/js/html files before creating the tar will work better ? (also using a css sprite image can decrease the amount of files)

tobozo commented 4 years ago

bump

tobozo commented 4 years ago

closing this as more relevant messages are now displayed when the filename exceeds 32 chars.

feel free to reopen if the symptoms are still there for you