Understand the generated svelteesp32 header content
mainThe generated header file contains:
- Metadata: Engine and configuration details.
- Constants: File counts (
SVELTEESP32_COUNT), total uncompressed size (SVELTEESP32_SIZE), and total gzip size (SVELTEESP32_SIZE_GZIP). - Data Arrays:
static const uint8_tarrays containing the gzipped file data. - ETags:
static const chararrays for file ETags. - File Manifest: A
SVELTEESP32_FileInfostruct array (SVELTEESP32_FILES) containing path, size, gzipSize, etag, and contentType for each file. - Initialization Function: A function (e.g.,
initSvelteStaticFiles) that sets up the routes and handles requests, including ETag/304 logic and Gzip content encoding. - Weak Hook: An
extern "C" void __attribute__((weak)) SVELTEESP32_onFileServed(const char* path, int statusCode)function that you can override for logging or metrics.