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

decompress to PSRAM instead of spi flash option #43

Closed rjjrbatarao closed 3 years ago

rjjrbatarao commented 3 years ago

I found your library useful for webserver application, I wanted to implement template processing on gzipped html files, the decompression works in spi flash/ sd but i wanted to decompress it on psram temporarily then feed it to template processing of the web server, this way could prolong spi flash, make html file with template smaller and utilize the external ram of esp32 like esp32 wrover or ttgo boards. I found your ESP32-PsRamFS library maybe theres a chance to implement my idea in the future?

tobozo commented 3 years ago

hi, thanks for your feedback :+1:

ESP32-targz supports PsRamFS already, you may enable it as follows:


#define DEST_FS_USES_PSRAMFS 
#include <PSRamFS.h>
#include <ESP32-targz.h>

Also PSRamFS is VFS compatible so it is mountable on a WebServer as well as usable with ESP32-targz

  server.serveStatic("/", PSRamFS, "/");

Please let me know if some features are missing,

rjjrbatarao commented 3 years ago

Awesome thanks for this great library.