Flash size reduction for mime-type by s-hadinger · Pull Request #7312 · esp8266/Arduino (original) (raw)

Superseded #7311

The current mime-type array is based on Entry structure with fixed size string that waste a lot of Flash space (~400 bytes):

struct Entry
{
  const char endsWith[16]; 
  const char mimeType[32];
};

I replaced with standard PROGMEM strings.

I also added #define MIMETYPE_MINIMAL to reduce the footprint to mime-types that are strictly necessary: html, txt, gz

Overall this saves 1kB for Tasmota.