Revert "Make packed fs always available, and manually settable"

This commit is contained in:
Sergio R. Caprile authored and GitHub committed 2026-03-24 16:23:11 -03:00
1 parent b852e0f8c3
commit bb37f72a63
83 files changed
+8051 -288

No files matched your search

+1 -1
View File
@@ -5,7 +5,7 @@ SOURCES = main.c mongoose.c net.c packed_fs.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
# CFLAGS_MONGOOSE +=
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG = example.exe # Use .exe suffix for the binary
@@ -1,4 +1,5 @@
#define MG_ARCH MG_ARCH_ESP32
#define MG_ENABLE_PACKED_FS 1
#define MG_TLS MG_TLS_NONE // change to 'MG_TLS_MBED' to enable TLS
#define MG_OTA MG_OTA_CUSTOM
@@ -11,7 +11,7 @@ SOURCES = main.c syscalls.c startup.c
# Mongoose-specific source code files and build options. See https://mongoose.ws/documentation/#build-options
SOURCES += mongoose.c net.c packed_fs.c
CFLAGS += -DMG_ENABLE_TCPIP=1 -DMG_ARCH=MG_ARCH_ARMGCC -DMG_ENABLE_CUSTOM_MILLIS=1 -DMG_ENABLE_LINES=1
CFLAGS += -DMG_ENABLE_DRIVER_SAME54=1 -DMG_ENABLE_CUSTOM_RANDOM=1 $(CFLAGS_EXTRA)
CFLAGS += -DMG_ENABLE_DRIVER_SAME54=1 -DMG_ENABLE_CUSTOM_RANDOM=1 -DMG_ENABLE_PACKED_FS=1 $(CFLAGS_EXTRA)
# Example specific build options. See README.md
CFLAGS += -DHTTP_URL=\"http://0.0.0.0/\"
-1
View File
@@ -256,5 +256,4 @@ void web_init(struct mg_mgr *mgr) {
mg_http_listen(mgr, HTTPS_URL, fn, NULL);
mg_timer_add(mgr, 3600 * 1000, MG_TIMER_RUN_NOW | MG_TIMER_REPEAT,
timer_sntp_fn, mgr);
mg_mem_files = mg_packed_files;
}
-1
View File
@@ -1 +0,0 @@
../../../test/pack.js
+81
View File
@@ -0,0 +1,81 @@
// Copyright (c) 2024 Cesanta Software Limited
//
// Utility that generates packed filesystem C file compatible with the
// Mongoose Network Library, https://github.com/cesanta/mongoose
//
// Usage:
// node pack.js FILE[:DESTINATION[:gzip]] ...
const fs = require('fs');
const zlib = require('zlib');
const argv = process.argv.slice(2);
// Convert each command-line arguments into [ DATA_ARRAY, STRUCT_INITIALIZER ]
const entries = argv.map(function(filename, i) {
const parts = filename.split(':');
const stat = fs.statSync(parts[0]);
const data = fs.readFileSync(parts[0], null);
let bytes = Array.from(data);
let destination = (parts[1] || parts[0]).replace(/^\.+[\/\\]*/, '');
if (parts[2] == 'gzip') {
bytes = Array.from(zlib.gzipSync(data));
destination += '.gz';
}
// concat(0) appends trailing 0, in order to make any file an asciz string
return [
`static const unsigned char v${i}[] = {${bytes.concat(0).join(',')}};`,
` {"/${destination}", v${i}, sizeof(v${i}) - 1, ${parseInt(stat.mtimeMs / 1000)}}`,
];
});
process.stdout.write(`// DO NOT EDIT. This file is generated using this command:
// ${process.argv.join(' ')}
#include <stddef.h>
#include <string.h>
#include <time.h>
#if defined(__cplusplus)
extern "C" {
#endif
const char *mg_unlist(size_t no);
const char *mg_unpack(const char *, size_t *, time_t *);
#if defined(__cplusplus)
}
#endif
${entries.map(x => x[0]).join('\n\n')}
static const struct packed_file {
const char *name;
const unsigned char *data;
size_t size;
time_t mtime;
} packed_files[] = {
${entries.map(x => x[1]).join(',\n')},
{NULL, NULL, 0, 0}
};
static int scmp(const char *a, const char *b) {
while (*a && (*a == *b)) a++, b++;
return *(const unsigned char *) a - *(const unsigned char *) b;
}
const char *mg_unlist(size_t no) {
return packed_files[no].name;
}
const char *mg_unpack(const char *name, size_t *size, time_t *mtime) {
const struct packed_file *p;
for (p = packed_files; p->name != NULL; p++) {
if (scmp(p->name, name) != 0) continue;
if (size != NULL) *size = p->size;
if (mtime != NULL) *mtime = p->mtime;
return (const char *) p->data;
}
return NULL;
};
`);
+53 -15
View File
@@ -1,29 +1,67 @@
// DO NOT EDIT. This file is generated using this command:
// /opt/homebrew/Cellar/node/25.6.1_1/bin/node /Users/cpq/src/mongoose/tutorials/http/device-dashboard/pack.js web_root/bundle.js::gzip web_root/components.js::gzip web_root/history.min.js::gzip web_root/index.html::gzip web_root/main.js::gzip certs/server_cert.pem certs/server_key.pem
// /usr/local/lib/nodejs/node-v18.16.1-linux-x64/bin/node /home/scaprile/work/cesanta/mongoose/tutorials/http/device-dashboard/pack.js web_root/bundle.js::gzip web_root/components.js::gzip web_root/history.min.js::gzip web_root/index.html::gzip web_root/main.js::gzip certs/server_cert.pem certs/server_key.pem
#include "mongoose.h"
#include <stddef.h>
#include <string.h>
#include <time.h>
static const unsigned char v0[] = {31,139,8,0,0,0,0,0,0,19,173,60,139,114,219,56,146,191,18,105,83,90,98,132,200,118,102,178,119,71,25,81,37,30,79,156,153,60,188,118,30,187,171,209,170,40,10,178,56,166,64,153,132,228,120,76,221,183,95,119,227,65,82,166,231,246,182,174,42,17,65,60,27,141,126,163,233,109,148,63,81,92,115,201,167,60,231,25,79,248,134,167,60,22,247,59,30,137,241,132,23,226,32,138,19,93,202,111,193,40,44,202,171,82,149,235,242,41,43,243,245,178,188,202,147,121,153,221,22,229,74,197,165,210,183,101,162,228,56,94,78,202,223,179,172,252,103,150,207,203,68,203,60,58,72,134,139,141,138,117,146,169,39,139,0,22,99,247,139,44,15,182,176,178,124,146,168,39,154,169,177,156,8,13,63,195,92,234,77,174,158,168,157,31,177,14,20,187,199,190,90,168,193,58,202,165,210,31,178,185,28,234,94,79,15,114,185,202,182,242,100,153,164,115,232,86,13,90,6,180,35,51,208,110,11,182,52,196,117,19,92,83,178,238,181,188,235,10,145,140,114,33,199,201,36,236,230,114,65,239,153,121,223,192,15,149,134,201,34,136,242,171,205,10,86,46,6,169,84,87,122,249,242,121,175,23,108,6,49,46,12,16,137,7,237,223,143,212,32,142,210,180,26,201,159,179,112,202,120,215,193,8,107,233,187,181,204,22,79,96,39,106,147,166,29,161,7,115,185,136,54,169,62,207,179,117,193,60,176,123,245,219,44,153,63,57,20,66,32,136,8,7,66,218,236,3,53,204,225,114,14,184,216,208,217,226,42,53,36,1,202,220,161,27,68,1,138,16,164,80,241,53,78,18,78,57,224,40,204,57,96,38,204,248,116,122,29,226,12,80,112,207,89,120,8,191,210,189,206,67,3,26,20,99,87,183,52,133,56,83,133,206,55,177,206,242,170,211,150,218,16,231,253,190,12,147,157,63,125,83,91,161,101,171,224,196,241,188,169,16,108,24,223,84,219,216,6,236,222,12,188,143,55,57,210,7,77,187,171,122,172,144,132,220,220,254,208,170,246,59,67,148,122,153,20,3,218,185,128,119,124,1,168,181,252,166,133,174,250,94,153,190,64,19,6,74,205,252,196,211,233,8,90,225,193,241,7,254,93,15,18,53,151,223,62,66,95,214,63,98,4,214,208,147,254,80,31,43,234,100,72,102,168,251,125,102,167,237,136,64,10,106,28,235,9,115,120,144,80,33,221,114,244,98,17,214,66,83,106,128,5,132,199,44,91,109,96,230,249,137,203,97,181,158,162,245,252,90,248,18,27,62,197,162,129,38,30,204,162,2,138,120,160,90,28,254,155,27,184,127,48,161,217,203,44,151,209,245,206,110,15,161,172,157,224,53,2,29,116,112,204,28,40,158,158,162,115,8,51,231,131,245,166,88,66,115,175,215,57,129,234,188,223,47,203,172,35,136,33,102,25,76,32,47,36,156,66,158,168,43,232,19,4,89,107,75,89,38,44,56,169,49,199,73,96,176,228,100,35,138,16,32,99,58,190,124,80,100,185,6,50,28,42,1,229,101,178,208,1,27,50,7,157,134,74,131,18,62,21,150,216,51,87,72,69,144,16,114,24,244,222,226,143,228,65,76,40,56,71,248,166,40,116,1,200,69,0,18,56,97,212,75,36,248,219,63,226,159,130,24,192,200,56,246,86,220,204,8,91,141,7,217,173,146,249,229,151,55,167,169,68,97,195,13,190,113,216,114,52,78,39,150,25,185,33,217,20,200,34,97,97,202,169,157,241,139,96,10,43,209,155,236,136,180,215,155,65,51,227,110,19,47,53,98,217,238,152,13,9,201,226,176,194,212,183,224,161,254,40,12,242,22,124,205,151,124,203,239,248,140,95,243,19,49,237,245,136,47,202,50,226,223,196,137,35,28,196,41,110,233,26,247,190,0,194,90,28,107,223,214,32,170,45,33,234,122,188,152,8,179,23,168,209,240,6,231,215,157,101,89,42,163,26,15,108,161,242,33,103,108,71,56,50,236,130,56,130,131,111,246,86,155,213,76,230,205,186,89,114,149,40,93,31,63,39,104,96,91,244,48,101,22,190,202,243,232,110,144,20,244,12,182,12,186,173,248,189,19,54,225,118,87,235,78,130,56,220,194,86,102,47,15,161,227,150,184,149,111,141,244,129,39,200,93,248,5,185,59,162,95,115,126,91,162,152,112,203,72,252,224,155,144,84,57,35,172,204,128,64,12,82,68,176,20,39,6,43,203,94,143,102,19,98,137,15,124,195,165,4,190,99,129,97,63,75,155,67,153,22,242,9,30,198,26,206,96,125,252,109,184,6,228,227,90,52,223,26,25,249,143,39,187,199,94,110,54,195,207,75,58,168,221,39,32,146,45,95,138,101,89,198,13,58,225,119,98,107,152,96,45,104,175,176,200,18,159,29,177,6,118,0,82,9,144,44,24,167,202,94,239,218,240,59,189,57,220,115,91,185,38,108,196,101,9,200,3,2,54,52,115,55,178,146,122,6,211,205,196,93,171,10,54,27,193,13,33,21,226,126,224,57,218,146,152,73,197,105,176,5,88,65,146,166,226,179,217,7,63,1,154,78,91,167,146,118,42,162,104,24,205,96,24,110,9,101,30,50,87,90,51,98,64,206,66,199,84,92,5,75,6,178,199,178,129,20,51,224,130,111,195,197,179,103,32,84,104,19,120,74,208,243,15,150,171,250,225,12,189,158,43,9,162,141,185,135,231,85,48,101,3,5,74,237,50,153,165,40,249,248,215,0,251,114,34,24,134,26,225,154,44,15,195,135,215,117,62,124,31,32,231,241,235,113,191,239,31,53,145,121,106,4,65,101,221,129,68,48,74,0,196,223,225,48,239,245,178,99,39,84,134,25,204,7,194,46,31,103,19,18,123,72,205,48,92,180,108,113,106,116,217,41,136,41,156,62,252,28,160,176,65,113,51,37,202,209,204,219,58,53,69,125,102,20,181,107,16,186,44,65,186,24,82,80,109,226,2,42,131,38,19,43,6,86,92,145,173,100,16,184,105,81,15,153,153,119,112,176,218,41,31,198,107,43,127,174,11,68,35,8,137,218,17,183,94,102,107,60,13,150,152,39,167,223,6,27,122,3,67,150,1Line truncated
#if defined(__cplusplus)
extern "C" {
#endif
static const unsigned char v1[] = {31,139,8,0,0,0,0,0,0,19,237,93,235,115,219,70,146,255,238,191,98,162,242,45,169,181,0,225,77,64,182,148,114,156,77,57,85,246,94,42,78,244,37,151,59,67,36,40,34,198,131,7,64,148,100,133,255,251,245,175,103,0,12,64,74,206,195,187,117,167,219,84,12,14,230,61,253,238,158,38,53,185,170,19,81,55,85,58,111,38,207,159,164,249,186,172,26,113,39,86,71,162,74,138,69,82,29,9,234,240,174,137,155,132,75,127,91,46,147,121,195,197,239,147,229,145,88,53,121,118,36,190,47,175,154,164,18,91,177,172,202,92,136,137,121,124,113,85,44,178,196,252,165,166,73,159,28,31,139,215,73,182,166,30,203,171,98,222,164,101,33,154,85,220,208,10,205,85,85,212,34,22,107,26,151,210,70,84,117,93,102,155,132,234,151,152,117,145,100,241,237,147,121,89,212,141,248,26,101,113,42,166,121,125,36,54,113,118,40,78,207,68,145,92,139,239,228,4,83,53,22,213,117,210,252,144,230,9,109,173,173,61,18,237,176,67,218,85,114,195,103,149,19,127,139,15,154,248,238,137,16,171,36,174,154,19,236,105,93,99,34,156,241,253,139,122,115,41,230,89,92,215,167,79,239,184,201,228,183,173,184,201,179,162,62,61,88,53,205,250,228,248,248,250,250,218,188,118,205,178,186,60,118,44,203,58,166,97,7,98,153,102,217,233,65,81,22,201,129,216,164,201,245,87,229,205,233,129,37,44,225,120,244,255,193,217,139,117,220,172,128,133,242,67,98,100,105,145,204,227,245,233,65,85,18,16,15,244,234,95,202,180,24,215,95,167,139,102,117,122,224,28,136,197,233,193,91,207,116,237,80,4,120,198,158,233,11,252,163,133,44,11,117,129,247,198,118,132,99,161,148,205,204,32,116,12,126,14,122,26,220,209,232,186,83,15,55,200,12,27,83,202,231,158,238,194,250,72,167,56,198,49,232,131,206,124,246,254,136,32,185,40,175,139,151,85,85,226,192,255,76,128,142,96,99,155,126,91,117,122,48,191,170,136,178,155,87,101,86,86,7,103,226,15,129,30,144,142,68,104,58,254,235,153,233,199,14,21,4,63,24,34,221,235,38,26,53,117,111,171,125,45,60,112,99,140,155,140,174,237,181,237,211,178,182,147,185,194,205,169,41,115,13,55,55,232,229,28,173,7,226,152,142,211,3,255,106,253,47,208,127,78,208,231,150,225,102,6,64,14,208,3,236,57,189,156,219,59,128,159,151,151,143,14,226,166,31,121,194,53,35,111,110,90,145,97,250,158,99,250,129,65,239,194,54,109,27,133,21,213,68,238,220,244,1,58,219,36,176,186,81,200,173,212,152,153,142,237,210,139,19,218,52,65,224,154,238,12,146,202,37,233,19,152,129,231,155,225,204,180,168,202,242,76,219,163,98,232,154,142,99,218,206,204,116,29,170,138,2,115,6,44,204,48,241,204,167,6,47,163,201,236,153,97,122,126,16,211,34,132,48,249,36,184,208,138,238,204,244,34,116,137,2,96,211,155,237,244,49,76,39,160,87,207,181,33,219,44,203,53,67,103,54,167,218,136,150,246,104,94,55,52,3,219,69,129,14,16,57,49,109,193,143,132,124,98,2,75,208,134,124,26,97,89,180,203,89,104,218,52,130,246,230,17,148,176,180,101,209,169,156,112,110,122,116,2,215,55,125,215,51,35,223,107,151,197,170,14,1,232,158,221,209,17,130,136,206,192,187,107,15,74,139,185,190,111,208,74,180,175,25,21,172,153,131,205,207,2,64,132,118,72,0,226,135,58,32,32,24,98,16,29,193,14,105,140,31,210,210,17,13,12,60,207,12,131,40,51,58,188,224,32,132,101,15,189,2,194,24,182,192,168,179,87,6,48,235,81,7,160,22,235,57,6,112,107,180,152,151,179,24,18,187,52,77,128,246,25,193,208,181,169,68,24,230,245,12,194,49,182,232,8,126,180,91,52,128,101,236,209,193,193,34,234,75,103,2,170,229,193,12,198,181,132,193,94,92,75,72,25,64,55,67,116,102,236,135,40,193,221,144,232,6,106,176,27,90,150,250,99,49,143,234,9,194,132,110,19,231,151,216,142,92,236,20,79,198,182,193,216,6,178,113,184,16,72,8,37,18,228,16,73,69,60,111,184,151,216,120,245,236,161,45,130,108,13,198,57,142,27,48,198,9,225,1,240,77,43,1,30,142,232,161,194,216,39,142,1,203,80,141,69,44,36,193,25,18,194,81,32,38,242,73,197,3,227,10,1,132,113,154,217,147,168,250,40,229,214,31,21,9,54,109,221,137,73,10,130,221,109,35,160,15,249,98,217,1,204,129,145,80,36,107,172,73,139,203,250,245,99,19,141,182,69,150,80,176,138,8,67,170,76,136,5,90,125,9,24,2,73,78,255,244,74,11,149,111,129,83,17,64,139,81,187,237,240,12,185,129,231,160,183,181,111,10,139,167,32,221,207,189,121,142,200,8,86,46,79,225,254,174,41,228,130,188,250,125,56,59,127,108,56,35,17,76,188,113,206,224,178,4,142,62,128,150,5,243,202,112,7,192,226,58,129,17,231,196,154,126,78,162,205,253,83,19,24,129,17,181,19,184,191,125,130,136,39,176,204,93,100,205,227,226,177,225,137,232,154,97,243,58,120,57,52,204,36,239,108,104,209,183,0,166,236,100,135,195,94,54,121,58,142,234,6,200,157,239,116,32,87,137,251,172,12,116,49,72,177,143,87,178,121,37,59,220,24,188,214,111,150,121,66,250,63,73,253,161,41,215,143,13,45,228,131,204,96,47,67,227,205,226,22,2,80,240,145,128,205,225,188,1,226,28,123,5,3,35,112,108,126,188,108,251,1,136,176,223,103,231,60,75,78,154,209,33,43,122,104,122,219,189,41,255,218,167,199,24,43,194,246,207,81,159,19,10,173,17,113,216,176,195,132,187,103,156,229,138,110,208,57,97,242,119,46,233,240,146,99,198,139,179,228,159,27,46,248,167,104,53,178,15,97,110,195,22,39,56,145,117,236,17,175,200,15,0,146,236,92,223,227,112,192,203,208,140,130,1Line truncated
const char *mg_unlist(size_t no);
const char *mg_unpack(const char *, size_t *, time_t *);
static const unsigned char v2[] = {31,139,8,0,0,0,0,0,0,19,237,91,109,111,219,186,146,254,43,182,47,214,144,96,86,181,123,206,61,187,43,151,215,72,211,52,9,144,32,65,147,246,124,8,140,3,197,166,109,181,50,233,82,146,147,192,214,127,223,25,190,72,148,45,167,233,222,158,189,7,187,251,37,150,248,50,28,14,135,51,207,67,49,237,89,206,39,89,44,184,151,17,238,111,58,226,254,11,155,100,29,74,179,167,21,19,179,22,123,92,9,153,165,221,238,94,205,82,76,243,132,141,244,79,96,218,81,238,249,97,199,202,172,26,79,217,44,230,172,219,213,191,65,180,156,142,244,163,119,55,134,113,195,67,227,142,204,111,112,22,167,153,144,79,74,126,230,190,21,94,182,136,83,82,78,195,223,72,150,229,146,183,170,137,249,27,251,220,226,158,240,55,241,204,99,119,98,236,155,134,248,108,245,31,174,35,217,146,20,139,232,198,148,133,155,130,196,211,80,144,68,68,83,54,13,219,131,98,104,186,102,216,117,18,37,137,39,173,4,34,73,245,204,125,120,209,221,104,187,95,85,20,56,12,163,155,82,16,15,150,20,22,32,152,80,6,127,87,180,211,33,220,235,195,228,238,220,245,33,12,86,40,79,89,43,205,100,12,214,26,150,243,18,56,75,171,84,183,155,5,127,252,193,210,75,189,66,89,184,1,91,71,121,146,133,89,81,112,167,10,117,130,49,37,139,50,118,29,101,11,10,67,71,50,181,207,137,152,68,40,61,61,146,236,228,91,30,37,212,54,190,48,53,101,193,37,91,194,122,148,203,98,74,207,162,116,177,91,246,78,138,135,148,73,91,188,22,241,180,213,183,102,247,222,248,195,43,229,9,129,118,143,107,41,86,76,102,79,30,39,157,250,208,29,178,97,60,95,50,25,221,39,44,132,137,204,89,22,238,123,129,220,209,184,40,124,114,112,132,189,9,191,120,144,189,158,48,142,154,84,12,147,26,60,51,169,210,222,47,28,42,174,86,232,217,169,84,139,250,98,193,85,23,171,124,4,202,255,187,79,38,84,120,145,79,114,120,251,15,159,164,240,150,251,100,6,111,255,233,147,4,222,102,254,240,192,234,78,2,227,121,164,201,37,210,189,218,186,27,37,182,190,32,59,81,202,221,3,59,14,13,239,209,116,122,193,162,105,204,231,55,9,12,71,221,72,160,103,219,121,13,145,134,102,193,100,17,201,163,12,54,26,108,18,40,235,193,72,60,64,193,171,31,23,16,164,249,61,116,133,213,14,43,49,215,18,86,230,145,214,213,55,22,239,43,9,49,159,178,199,171,153,199,29,17,176,245,24,159,103,11,87,210,173,140,226,228,229,26,101,70,196,171,129,146,155,196,19,230,245,201,43,171,92,181,205,93,73,184,230,156,102,219,45,8,35,12,131,144,192,63,18,54,175,85,179,243,183,142,63,148,109,74,95,13,186,93,79,64,141,209,89,250,132,87,111,16,235,124,187,1,156,206,35,236,108,252,205,202,96,85,175,120,71,70,236,99,193,148,77,196,148,125,250,120,14,54,34,155,21,40,205,163,37,11,57,73,89,36,39,139,16,164,194,204,217,168,211,9,25,89,128,117,66,80,18,74,4,150,136,162,168,135,184,134,249,6,86,38,204,25,108,165,164,194,204,179,0,133,193,236,25,47,21,80,166,41,231,0,9,13,6,135,137,192,131,39,123,212,104,226,120,5,67,237,122,204,39,2,154,254,13,155,10,211,84,171,232,52,21,168,118,79,64,198,40,234,254,254,231,68,253,23,4,247,90,108,54,145,38,74,211,120,14,102,168,101,87,33,61,109,202,193,144,191,141,228,28,162,13,135,156,173,61,112,200,123,61,109,106,70,203,186,59,62,30,218,110,162,21,131,41,125,51,192,74,138,76,32,8,64,235,95,61,112,27,212,116,154,101,68,248,96,64,204,187,42,73,251,133,157,62,228,104,12,181,125,159,68,16,146,98,140,90,240,58,192,176,37,188,9,134,45,21,136,247,38,89,183,52,136,223,104,175,53,147,55,155,11,77,207,231,21,60,201,70,94,76,193,67,211,106,39,249,96,10,18,195,102,5,233,20,32,13,52,144,30,64,7,40,213,178,96,189,227,210,213,96,18,213,11,108,50,213,85,121,222,72,187,148,125,173,60,68,117,209,133,232,105,61,251,226,135,85,113,7,196,160,215,142,180,179,233,151,29,17,88,132,254,215,211,143,216,93,23,117,140,162,208,145,119,187,142,210,106,78,122,120,51,59,84,247,43,123,2,180,34,106,51,25,193,246,104,187,243,220,25,187,156,49,216,46,178,225,221,119,42,136,40,31,125,212,172,236,224,148,147,184,104,116,224,198,40,91,237,110,152,10,119,236,111,119,186,42,214,143,88,168,76,129,69,248,128,5,56,77,124,135,95,152,66,159,228,149,218,153,182,135,10,209,240,235,127,111,227,42,111,167,78,238,45,134,89,137,156,197,159,190,235,75,148,245,11,152,144,122,2,99,182,163,12,214,102,148,231,73,66,156,109,225,88,146,114,183,121,70,149,155,120,186,11,206,157,57,189,112,43,65,14,64,172,141,213,109,154,217,141,213,192,14,178,81,134,61,32,55,13,247,118,90,60,106,232,32,70,176,197,65,124,40,189,118,31,255,98,54,105,15,252,130,37,96,49,85,88,64,4,7,110,33,27,2,62,196,63,230,174,2,71,35,70,171,85,242,228,105,167,39,101,156,242,75,132,14,254,151,167,11,143,213,76,6,178,6,48,142,8,102,113,146,49,233,237,167,229,86,134,233,161,64,243,196,238,152,54,248,101,116,55,94,130,241,143,164,140,158,48,156,48,218,31,178,183,217,144,65,8,229,119,108,236,4,80,54,30,194,176,66,158,68,147,69,227,184,245,25,113,191,40,231,178,73,89,6,97,117,185,202,32,137,78,4,159,197,114,9,240,130,167,49,202,184,21,144,70,161,47,227,211,11,0,98,140,51,25,74,194,69,22,207,158,108,65,26,198,136,17,185,221,10,52,254,65,136,54,137,248,167,148,189,191,186,164,109,175,147,115,141,95,167,213,2,63,0,100,16,15,219,109,91,63,4,83,49,81,243,222,47Line truncated
#if defined(__cplusplus)
}
#endif
static const unsigned char v3[] = {31,139,8,0,0,0,0,0,0,19,109,83,201,110,219,48,16,189,231,43,166,188,240,208,136,218,23,7,162,129,52,205,161,135,162,61,180,69,123,100,36,218,98,194,197,37,105,43,254,251,82,150,237,36,78,1,129,51,122,243,102,33,103,166,253,240,249,219,221,143,63,223,239,97,240,74,46,175,218,73,128,100,122,77,17,215,8,58,201,156,163,104,136,86,91,41,225,97,29,141,131,240,28,45,175,0,218,129,179,126,82,130,234,133,151,124,217,198,179,156,49,197,61,131,110,96,214,113,79,209,214,175,162,6,65,252,218,56,120,191,137,248,223,173,216,81,244,59,250,121,27,221,25,181,97,94,60,72,30,50,27,237,185,14,158,95,238,41,239,215,252,194,87,51,197,41,218,9,62,110,140,245,175,232,163,232,253,64,123,190,19,29,143,14,63,215,32,180,240,130,201,200,117,76,114,154,146,228,37,152,20,250,9,44,151,20,137,16,2,129,223,111,66,92,161,216,154,199,110,183,254,248,172,36,130,193,242,21,69,61,243,236,230,141,229,186,13,10,4,69,59,138,167,219,220,196,241,56,142,100,204,137,177,235,56,75,146,100,162,98,88,9,41,41,214,70,115,12,83,205,159,204,51,197,9,36,144,21,225,195,224,188,53,79,199,114,41,78,73,121,130,40,238,182,214,134,139,221,25,105,44,94,66,27,30,104,56,241,67,241,188,99,27,138,173,217,234,30,191,134,31,141,208,103,188,167,248,107,90,144,166,172,33,173,73,210,100,44,203,73,83,52,112,20,161,146,164,36,69,89,68,41,201,211,219,134,44,170,26,230,51,152,210,180,129,5,169,203,93,68,234,95,139,219,10,170,131,67,5,139,93,64,217,37,59,202,66,140,12,42,146,100,89,151,146,58,207,73,85,64,78,202,10,194,203,55,37,76,153,74,152,50,169,146,212,105,1,9,203,10,146,5,236,40,14,81,142,166,51,37,135,60,24,210,179,1,135,22,66,59,61,239,242,162,155,115,183,166,118,184,208,15,235,148,35,138,199,34,204,135,157,79,210,57,135,230,166,59,191,151,220,13,156,251,99,144,54,62,141,117,251,96,250,253,219,5,64,97,196,39,244,96,118,157,21,27,15,206,118,47,201,186,94,19,207,132,28,133,238,67,18,210,25,53,249,204,212,247,94,194,121,99,247,68,9,77,30,221,255,137,243,60,42,211,111,167,165,56,184,41,246,142,31,170,62,172,239,63,221,71,42,213,207,3,0,0,0};
static const unsigned char v0[] = {31,139,8,0,0,0,0,0,0,3,173,60,139,114,219,56,146,191,18,105,83,90,98,132,200,118,102,178,119,71,25,81,37,30,79,156,153,60,188,118,30,187,171,209,170,40,10,178,56,166,64,153,132,228,120,76,221,183,95,119,227,65,82,166,231,246,182,174,42,17,65,60,27,141,126,163,233,109,148,63,81,92,115,201,167,60,231,25,79,248,134,167,60,22,247,59,30,137,241,132,23,226,32,138,19,93,202,111,193,40,44,202,171,82,149,235,242,41,43,243,245,178,188,202,147,121,153,221,22,229,74,197,165,210,183,101,162,228,56,94,78,202,223,179,172,252,103,150,207,203,68,203,60,58,72,134,139,141,138,117,146,169,39,139,0,22,99,247,139,44,15,182,176,178,124,146,168,39,154,169,177,156,8,13,63,195,92,234,77,174,158,168,157,31,177,14,20,187,199,190,90,168,193,58,202,165,210,31,178,185,28,234,94,79,15,114,185,202,182,242,100,153,164,115,232,86,13,90,6,180,35,51,208,110,11,182,52,196,117,19,92,83,178,238,181,188,235,10,145,140,114,33,199,201,36,236,230,114,65,239,153,121,223,192,15,149,134,201,34,136,242,171,205,10,86,46,6,169,84,87,122,249,242,121,175,23,108,6,49,46,12,16,137,7,237,223,143,212,32,142,210,180,26,201,159,179,112,202,120,215,193,8,107,233,187,181,204,22,79,96,39,106,147,166,29,161,7,115,185,136,54,169,62,207,179,117,193,60,176,123,245,219,44,153,63,57,20,66,32,136,8,7,66,218,236,3,53,204,225,114,14,184,216,208,217,226,42,53,36,1,202,220,161,27,68,1,138,16,164,80,241,53,78,18,78,57,224,40,204,57,96,38,204,248,116,122,29,226,12,80,112,207,89,120,8,191,210,189,206,67,3,26,20,99,87,183,52,133,56,83,133,206,55,177,206,242,170,211,150,218,16,231,253,190,12,147,157,63,125,83,91,161,101,171,224,196,241,188,169,16,108,24,223,84,219,216,6,236,222,12,188,143,55,57,210,7,77,187,171,122,172,144,132,220,220,254,208,170,246,59,67,148,122,153,20,3,218,185,128,119,124,1,168,181,252,166,133,174,250,94,153,190,64,19,6,74,205,252,196,211,233,8,90,225,193,241,7,254,93,15,18,53,151,223,62,66,95,214,63,98,4,214,208,147,254,80,31,43,234,100,72,102,168,251,125,102,167,237,136,64,10,106,28,235,9,115,120,144,80,33,221,114,244,98,17,214,66,83,106,128,5,132,199,44,91,109,96,230,249,137,203,97,181,158,162,245,252,90,248,18,27,62,197,162,129,38,30,204,162,2,138,120,160,90,28,254,155,27,184,127,48,161,217,203,44,151,209,245,206,110,15,161,172,157,224,53,2,29,116,112,204,28,40,158,158,162,115,8,51,231,131,245,166,88,66,115,175,215,57,129,234,188,223,47,203,172,35,136,33,102,25,76,32,47,36,156,66,158,168,43,232,19,4,89,107,75,89,38,44,56,169,49,199,73,96,176,228,100,35,138,16,32,99,58,190,124,80,100,185,6,50,28,42,1,229,101,178,208,1,27,50,7,157,134,74,131,18,62,21,150,216,51,87,72,69,144,16,114,24,244,222,226,143,228,65,76,40,56,71,248,166,40,116,1,200,69,0,18,56,97,212,75,36,248,219,63,226,159,130,24,192,200,56,246,86,220,204,8,91,141,7,217,173,146,249,229,151,55,167,169,68,97,195,13,190,113,216,114,52,78,39,150,25,185,33,217,20,200,34,97,97,202,169,157,241,139,96,10,43,209,155,236,136,180,215,155,65,51,227,110,19,47,53,98,217,238,152,13,9,201,226,176,194,212,183,224,161,254,40,12,242,22,124,205,151,124,203,239,248,140,95,243,19,49,237,245,136,47,202,50,226,223,196,137,35,28,196,41,110,233,26,247,190,0,194,90,28,107,223,214,32,170,45,33,234,122,188,152,8,179,23,168,209,240,6,231,215,157,101,89,42,163,26,15,108,161,242,33,103,108,71,56,50,236,130,56,130,131,111,246,86,155,213,76,230,205,186,89,114,149,40,93,31,63,39,104,96,91,244,48,101,22,190,202,243,232,110,144,20,244,12,182,12,186,173,248,189,19,54,225,118,87,235,78,130,56,220,194,86,102,47,15,161,227,150,184,149,111,141,244,129,39,200,93,248,5,185,59,162,95,115,126,91,162,152,112,203,72,252,224,155,144,84,57,35,172,204,128,64,12,82,68,176,20,39,6,43,203,94,143,102,19,98,137,15,124,195,165,4,190,99,129,97,63,75,155,67,153,22,242,9,30,198,26,206,96,125,252,109,184,6,228,227,90,52,223,26,25,249,143,39,187,199,94,110,54,195,207,75,58,168,221,39,32,146,45,95,138,101,89,198,13,58,225,119,98,107,152,96,45,104,175,176,200,18,159,29,177,6,118,0,82,9,144,44,24,167,202,94,239,218,240,59,189,57,220,115,91,185,38,108,196,101,9,200,3,2,54,52,115,55,178,146,122,6,211,205,196,93,171,10,54,27,193,13,33,21,226,126,224,57,218,146,152,73,197,105,176,5,88,65,146,166,226,179,217,7,63,1,154,78,91,167,146,118,42,162,104,24,205,96,24,110,9,101,30,50,87,90,51,98,64,206,66,199,84,92,5,75,6,178,199,178,129,20,51,224,130,111,195,197,179,103,32,84,104,19,120,74,208,243,15,150,171,250,225,12,189,158,43,9,162,141,185,135,231,85,48,101,3,5,74,237,50,153,165,40,249,248,215,0,251,114,34,24,134,26,225,154,44,15,195,135,215,117,62,124,31,32,231,241,235,113,191,239,31,53,145,121,106,4,65,101,221,129,68,48,74,0,196,223,225,48,239,245,178,99,39,84,134,25,204,7,194,46,31,103,19,18,123,72,205,48,92,180,108,113,106,116,217,41,136,41,156,62,252,28,160,176,65,113,51,37,202,209,204,219,58,53,69,125,102,20,181,107,16,186,44,65,186,24,82,80,109,226,2,42,131,38,19,43,6,86,92,145,173,100,16,184,105,81,15,153,153,119,112,176,218,41,31,198,107,43,127,174,11,68,35,8,137,218,17,183,94,102,107,60,13,150,152,39,167,223,6,27,122,3,67,150,10Line truncated
static const unsigned char v4[] = {31,139,8,0,0,0,0,0,0,19,189,91,233,114,219,72,146,254,239,167,168,230,184,155,164,155,0,9,82,151,105,81,29,62,219,158,112,219,14,75,118,108,143,66,225,6,137,34,137,22,174,0,64,145,28,13,223,105,159,97,159,108,191,204,194,81,32,33,74,125,236,206,168,105,28,85,89,89,89,121,124,153,85,232,118,133,248,240,241,226,245,80,60,255,244,78,76,108,207,75,132,191,72,82,145,164,118,156,138,165,155,206,69,211,142,220,110,83,184,129,8,99,71,198,34,13,69,34,227,27,41,210,185,20,118,20,9,59,21,118,176,22,95,62,191,123,244,168,185,72,36,58,199,238,36,109,62,123,228,250,81,8,50,183,98,222,17,177,12,208,187,35,208,224,60,181,83,201,87,175,167,83,57,73,249,242,179,156,118,196,60,245,189,142,248,28,46,82,12,180,17,211,56,244,133,104,154,221,241,34,112,60,105,254,158,232,68,223,77,194,32,233,136,247,225,204,13,58,226,92,166,169,27,204,58,226,197,34,77,67,122,128,81,58,34,117,163,151,161,23,198,104,200,255,74,167,35,62,132,169,59,117,39,118,234,82,187,79,54,250,103,215,95,34,47,180,157,55,174,39,21,149,156,7,176,48,9,49,110,32,131,52,81,108,60,162,209,83,26,61,20,35,17,197,97,148,136,209,25,207,224,183,211,228,102,38,38,158,157,36,163,199,183,252,202,228,187,141,88,249,94,144,140,26,243,52,141,134,221,238,114,185,52,151,3,51,140,103,221,126,175,215,235,162,91,67,220,184,114,249,34,92,141,26,61,209,19,86,223,60,57,230,223,195,198,217,169,35,167,201,217,105,146,174,61,121,102,122,158,49,241,18,195,186,157,186,158,55,12,192,219,51,8,62,188,150,195,127,128,86,118,109,248,46,68,233,185,248,103,104,21,15,151,174,147,206,135,61,243,48,90,61,219,156,118,21,193,211,174,34,63,19,174,51,106,188,183,215,50,254,214,111,8,199,78,109,35,176,125,153,61,19,253,70,181,141,101,212,181,178,208,42,178,161,62,74,12,141,156,91,52,29,53,126,193,132,142,250,29,203,60,233,127,61,49,159,90,207,45,243,240,164,195,63,61,252,223,234,88,248,235,153,7,39,111,15,108,203,60,56,232,240,15,191,50,44,195,28,28,63,55,143,158,226,47,107,13,233,160,73,207,51,76,188,180,250,182,121,2,202,86,214,222,180,14,13,80,250,122,104,30,30,227,205,49,254,178,110,230,201,145,129,255,222,30,152,199,131,175,199,102,255,4,175,143,240,199,175,123,29,190,57,124,251,212,60,32,138,135,248,43,94,128,226,201,225,215,129,121,112,248,188,210,5,60,91,131,206,160,99,30,31,225,175,120,200,12,218,102,255,41,254,212,67,98,19,255,209,188,158,170,31,245,152,39,247,182,111,14,158,126,37,225,144,92,142,59,252,163,88,62,232,152,253,195,183,150,181,243,162,20,232,191,26,221,189,146,39,177,42,225,126,181,118,5,143,213,96,90,111,107,135,199,224,88,26,76,252,233,193,46,7,232,128,137,130,125,208,176,171,19,179,168,239,224,216,195,172,77,203,214,164,131,199,150,101,90,7,154,20,233,209,129,121,112,156,175,72,33,120,203,80,55,160,111,13,242,229,44,133,111,168,101,57,122,75,203,162,47,52,189,161,102,95,177,146,186,106,96,33,173,67,136,1,92,177,210,148,26,69,111,6,166,101,117,170,186,215,83,179,96,1,119,103,217,127,48,217,179,223,224,13,166,139,96,66,62,68,188,149,54,252,92,235,214,131,99,88,40,215,6,175,151,200,244,124,30,46,207,93,71,142,109,186,47,111,54,109,113,251,72,192,63,166,139,56,80,254,227,209,169,227,222,228,235,55,158,25,203,57,172,24,110,213,157,92,175,225,127,35,163,39,254,109,92,30,156,92,137,213,210,152,46,60,79,140,217,55,27,99,17,173,141,190,120,124,171,209,23,63,252,32,154,145,103,28,247,155,27,145,198,118,144,184,196,168,1,103,47,156,69,204,158,207,24,244,122,234,221,52,140,253,198,25,248,209,89,136,86,32,154,141,132,1,122,194,167,159,169,39,87,2,140,249,137,49,129,95,148,49,247,67,207,177,242,157,233,58,130,59,80,55,13,17,6,19,15,252,195,33,202,27,114,148,85,137,180,248,217,119,55,237,77,62,102,42,87,169,145,120,136,20,198,65,175,151,145,6,241,199,183,236,247,77,116,74,6,69,235,185,113,212,16,221,108,252,110,126,161,77,129,153,165,31,195,18,51,59,50,86,198,1,88,240,166,6,92,162,76,39,115,225,205,134,234,249,81,57,150,214,63,150,96,197,69,212,211,8,193,197,229,67,213,12,166,75,166,24,178,102,20,116,77,34,59,168,206,219,23,219,243,135,62,205,164,67,97,216,78,134,88,97,210,171,141,54,126,149,131,185,235,56,50,160,225,198,94,56,185,166,139,185,26,126,105,68,43,126,62,51,102,177,13,109,1,113,97,199,174,109,168,62,224,32,94,200,202,212,88,234,42,32,66,131,220,212,35,47,207,234,221,16,46,22,99,148,175,137,210,249,141,182,214,249,147,82,76,221,234,42,241,63,244,3,35,218,232,118,148,43,198,237,34,246,148,189,100,134,162,226,238,7,251,230,189,27,92,35,244,182,110,153,165,14,179,2,8,17,19,144,64,39,52,207,227,113,166,206,217,192,54,183,25,53,254,241,248,150,46,54,141,92,104,234,94,140,70,212,93,252,36,154,144,145,90,129,195,158,90,143,177,183,144,198,17,108,101,22,135,139,168,41,134,162,201,207,89,146,199,120,62,15,111,100,60,172,182,85,207,114,121,31,230,157,55,74,149,148,58,12,4,158,1,32,57,134,239,136,8,214,150,171,129,7,119,2,88,99,28,137,105,24,224,137,244,221,113,232,57,186,61,208,188,11,67,88,162,37,25,67,33,240,199,74,60,155,92,232,133,212,33,240,253,94,231,198,13,61,153,26,22,77,33,49,104,18,158,189,214,46,141,48,146,193,144,189,6,11,105,101,244,10,133,161,2Line truncated
static const unsigned char v1[] = {31,139,8,0,0,0,0,0,0,3,237,93,235,115,219,70,146,255,238,191,98,162,242,45,169,181,0,225,77,64,182,148,114,156,77,57,85,246,94,42,78,244,37,151,59,67,36,40,34,198,131,7,64,148,100,133,255,251,245,175,103,0,12,64,74,206,195,187,117,167,219,84,12,14,230,61,253,238,158,38,53,185,170,19,81,55,85,58,111,38,207,159,164,249,186,172,26,113,39,86,71,162,74,138,69,82,29,9,234,240,174,137,155,132,75,127,91,46,147,121,195,197,239,147,229,145,88,53,121,118,36,190,47,175,154,164,18,91,177,172,202,92,136,137,121,124,113,85,44,178,196,252,165,166,73,159,28,31,139,215,73,182,166,30,203,171,98,222,164,101,33,154,85,220,208,10,205,85,85,212,34,22,107,26,151,210,70,84,117,93,102,155,132,234,151,152,117,145,100,241,237,147,121,89,212,141,248,26,101,113,42,166,121,125,36,54,113,118,40,78,207,68,145,92,139,239,228,4,83,53,22,213,117,210,252,144,230,9,109,173,173,61,18,237,176,67,218,85,114,195,103,149,19,127,139,15,154,248,238,137,16,171,36,174,154,19,236,105,93,99,34,156,241,253,139,122,115,41,230,89,92,215,167,79,239,184,201,228,183,173,184,201,179,162,62,61,88,53,205,250,228,248,248,250,250,218,188,118,205,178,186,60,118,44,203,58,166,97,7,98,153,102,217,233,65,81,22,201,129,216,164,201,245,87,229,205,233,129,37,44,225,120,244,255,193,217,139,117,220,172,128,133,242,67,98,100,105,145,204,227,245,233,65,85,18,16,15,244,234,95,202,180,24,215,95,167,139,102,117,122,224,28,136,197,233,193,91,207,116,237,80,4,120,198,158,233,11,252,163,133,44,11,117,129,247,198,118,132,99,161,148,205,204,32,116,12,126,14,122,26,220,209,232,186,83,15,55,200,12,27,83,202,231,158,238,194,250,72,167,56,198,49,232,131,206,124,246,254,136,32,185,40,175,139,151,85,85,226,192,255,76,128,142,96,99,155,126,91,117,122,48,191,170,136,178,155,87,101,86,86,7,103,226,15,129,30,144,142,68,104,58,254,235,153,233,199,14,21,4,63,24,34,221,235,38,26,53,117,111,171,125,45,60,112,99,140,155,140,174,237,181,237,211,178,182,147,185,194,205,169,41,115,13,55,55,232,229,28,173,7,226,152,142,211,3,255,106,253,47,208,127,78,208,231,150,225,102,6,64,14,208,3,236,57,189,156,219,59,128,159,151,151,143,14,226,166,31,121,194,53,35,111,110,90,145,97,250,158,99,250,129,65,239,194,54,109,27,133,21,213,68,238,220,244,1,58,219,36,176,186,81,200,173,212,152,153,142,237,210,139,19,218,52,65,224,154,238,12,146,202,37,233,19,152,129,231,155,225,204,180,168,202,242,76,219,163,98,232,154,142,99,218,206,204,116,29,170,138,2,115,6,44,204,48,241,204,167,6,47,163,201,236,153,97,122,126,16,211,34,132,48,249,36,184,208,138,238,204,244,34,116,137,2,96,211,155,237,244,49,76,39,160,87,207,181,33,219,44,203,53,67,103,54,167,218,136,150,246,104,94,55,52,3,219,69,129,14,16,57,49,109,193,143,132,124,98,2,75,208,134,124,26,97,89,180,203,89,104,218,52,130,246,230,17,148,176,180,101,209,169,156,112,110,122,116,2,215,55,125,215,51,35,223,107,151,197,170,14,1,232,158,221,209,17,130,136,206,192,187,107,15,74,139,185,190,111,208,74,180,175,25,21,172,153,131,205,207,2,64,132,118,72,0,226,135,58,32,32,24,98,16,29,193,14,105,140,31,210,210,17,13,12,60,207,12,131,40,51,58,188,224,32,132,101,15,189,2,194,24,182,192,168,179,87,6,48,235,81,7,160,22,235,57,6,112,107,180,152,151,179,24,18,187,52,77,128,246,25,193,208,181,169,68,24,230,245,12,194,49,182,232,8,126,180,91,52,128,101,236,209,193,193,34,234,75,103,2,170,229,193,12,198,181,132,193,94,92,75,72,25,64,55,67,116,102,236,135,40,193,221,144,232,6,106,176,27,90,150,250,99,49,143,234,9,194,132,110,19,231,151,216,142,92,236,20,79,198,182,193,216,6,178,113,184,16,72,8,37,18,228,16,73,69,60,111,184,151,216,120,245,236,161,45,130,108,13,198,57,142,27,48,198,9,225,1,240,77,43,1,30,142,232,161,194,216,39,142,1,203,80,141,69,44,36,193,25,18,194,81,32,38,242,73,197,3,227,10,1,132,113,154,217,147,168,250,40,229,214,31,21,9,54,109,221,137,73,10,130,221,109,35,160,15,249,98,217,1,204,129,145,80,36,107,172,73,139,203,250,245,99,19,141,182,69,150,80,176,138,8,67,170,76,136,5,90,125,9,24,2,73,78,255,244,74,11,149,111,129,83,17,64,139,81,187,237,240,12,185,129,231,160,183,181,111,10,139,167,32,221,207,189,121,142,200,8,86,46,79,225,254,174,41,228,130,188,250,125,56,59,127,108,56,35,17,76,188,113,206,224,178,4,142,62,128,150,5,243,202,112,7,192,226,58,129,17,231,196,154,126,78,162,205,253,83,19,24,129,17,181,19,184,191,125,130,136,39,176,204,93,100,205,227,226,177,225,137,232,154,97,243,58,120,57,52,204,36,239,108,104,209,183,0,166,236,100,135,195,94,54,121,58,142,234,6,200,157,239,116,32,87,137,251,172,12,116,49,72,177,143,87,178,121,37,59,220,24,188,214,111,150,121,66,250,63,73,253,161,41,215,143,13,45,228,131,204,96,47,67,227,205,226,22,2,80,240,145,128,205,225,188,1,226,28,123,5,3,35,112,108,126,188,108,251,1,136,176,223,103,231,60,75,78,154,209,33,43,122,104,122,219,189,41,255,218,167,199,24,43,194,246,207,81,159,19,10,173,17,113,216,176,195,132,187,103,156,229,138,110,208,57,97,242,119,46,233,240,146,99,198,139,179,228,159,27,46,248,167,104,53,178,15,97,110,195,22,39,56,145,117,236,17,175,200,15,0,146,236,92,223,227,112,192,203,208,140,130,15Line truncated
static const unsigned char v2[] = {31,139,8,0,0,0,0,0,0,3,237,91,109,111,219,186,146,254,43,182,47,214,144,96,86,181,123,206,61,187,43,151,215,72,211,52,9,144,32,65,147,246,124,8,140,3,197,166,109,181,50,233,82,146,147,192,214,127,223,25,190,72,148,45,167,233,222,158,189,7,187,251,37,150,248,50,28,14,135,51,207,67,49,237,89,206,39,89,44,184,151,17,238,111,58,226,254,11,155,100,29,74,179,167,21,19,179,22,123,92,9,153,165,221,238,94,205,82,76,243,132,141,244,79,96,218,81,238,249,97,199,202,172,26,79,217,44,230,172,219,213,191,65,180,156,142,244,163,119,55,134,113,195,67,227,142,204,111,112,22,167,153,144,79,74,126,230,190,21,94,182,136,83,82,78,195,223,72,150,229,146,183,170,137,249,27,251,220,226,158,240,55,241,204,99,119,98,236,155,134,248,108,245,31,174,35,217,146,20,139,232,198,148,133,155,130,196,211,80,144,68,68,83,54,13,219,131,98,104,186,102,216,117,18,37,137,39,173,4,34,73,245,204,125,120,209,221,104,187,95,85,20,56,12,163,155,82,16,15,150,20,22,32,152,80,6,127,87,180,211,33,220,235,195,228,238,220,245,33,12,86,40,79,89,43,205,100,12,214,26,150,243,18,56,75,171,84,183,155,5,127,252,193,210,75,189,66,89,184,1,91,71,121,146,133,89,81,112,167,10,117,130,49,37,139,50,118,29,101,11,10,67,71,50,181,207,137,152,68,40,61,61,146,236,228,91,30,37,212,54,190,48,53,101,193,37,91,194,122,148,203,98,74,207,162,116,177,91,246,78,138,135,148,73,91,188,22,241,180,213,183,102,247,222,248,195,43,229,9,129,118,143,107,41,86,76,102,79,30,39,157,250,208,29,178,97,60,95,50,25,221,39,44,132,137,204,89,22,238,123,129,220,209,184,40,124,114,112,132,189,9,191,120,144,189,158,48,142,154,84,12,147,26,60,51,169,210,222,47,28,42,174,86,232,217,169,84,139,250,98,193,85,23,171,124,4,202,255,187,79,38,84,120,145,79,114,120,251,15,159,164,240,150,251,100,6,111,255,233,147,4,222,102,254,240,192,234,78,2,227,121,164,201,37,210,189,218,186,27,37,182,190,32,59,81,202,221,3,59,14,13,239,209,116,122,193,162,105,204,231,55,9,12,71,221,72,160,103,219,121,13,145,134,102,193,100,17,201,163,12,54,26,108,18,40,235,193,72,60,64,193,171,31,23,16,164,249,61,116,133,213,14,43,49,215,18,86,230,145,214,213,55,22,239,43,9,49,159,178,199,171,153,199,29,17,176,245,24,159,103,11,87,210,173,140,226,228,229,26,101,70,196,171,129,146,155,196,19,230,245,201,43,171,92,181,205,93,73,184,230,156,102,219,45,8,35,12,131,144,192,63,18,54,175,85,179,243,183,142,63,148,109,74,95,13,186,93,79,64,141,209,89,250,132,87,111,16,235,124,187,1,156,206,35,236,108,252,205,202,96,85,175,120,71,70,236,99,193,148,77,196,148,125,250,120,14,54,34,155,21,40,205,163,37,11,57,73,89,36,39,139,16,164,194,204,217,168,211,9,25,89,128,117,66,80,18,74,4,150,136,162,168,135,184,134,249,6,86,38,204,25,108,165,164,194,204,179,0,133,193,236,25,47,21,80,166,41,231,0,9,13,6,135,137,192,131,39,123,212,104,226,120,5,67,237,122,204,39,2,154,254,13,155,10,211,84,171,232,52,21,168,118,79,64,198,40,234,254,254,231,68,253,23,4,247,90,108,54,145,38,74,211,120,14,102,168,101,87,33,61,109,202,193,144,191,141,228,28,162,13,135,156,173,61,112,200,123,61,109,106,70,203,186,59,62,30,218,110,162,21,131,41,125,51,192,74,138,76,32,8,64,235,95,61,112,27,212,116,154,101,68,248,96,64,204,187,42,73,251,133,157,62,228,104,12,181,125,159,68,16,146,98,140,90,240,58,192,176,37,188,9,134,45,21,136,247,38,89,183,52,136,223,104,175,53,147,55,155,11,77,207,231,21,60,201,70,94,76,193,67,211,106,39,249,96,10,18,195,102,5,233,20,32,13,52,144,30,64,7,40,213,178,96,189,227,210,213,96,18,213,11,108,50,213,85,121,222,72,187,148,125,173,60,68,117,209,133,232,105,61,251,226,135,85,113,7,196,160,215,142,180,179,233,151,29,17,88,132,254,215,211,143,216,93,23,117,140,162,208,145,119,187,142,210,106,78,122,120,51,59,84,247,43,123,2,180,34,106,51,25,193,246,104,187,243,220,25,187,156,49,216,46,178,225,221,119,42,136,40,31,125,212,172,236,224,148,147,184,104,116,224,198,40,91,237,110,152,10,119,236,111,119,186,42,214,143,88,168,76,129,69,248,128,5,56,77,124,135,95,152,66,159,228,149,218,153,182,135,10,209,240,235,127,111,227,42,111,167,78,238,45,134,89,137,156,197,159,190,235,75,148,245,11,152,144,122,2,99,182,163,12,214,102,148,231,73,66,156,109,225,88,146,114,183,121,70,149,155,120,186,11,206,157,57,189,112,43,65,14,64,172,141,213,109,154,217,141,213,192,14,178,81,134,61,32,55,13,247,118,90,60,106,232,32,70,176,197,65,124,40,189,118,31,255,98,54,105,15,252,130,37,96,49,85,88,64,4,7,110,33,27,2,62,196,63,230,174,2,71,35,70,171,85,242,228,105,167,39,101,156,242,75,132,14,254,151,167,11,143,213,76,6,178,6,48,142,8,102,113,146,49,233,237,167,229,86,134,233,161,64,243,196,238,152,54,248,101,116,55,94,130,241,143,164,140,158,48,156,48,218,31,178,183,217,144,65,8,229,119,108,236,4,80,54,30,194,176,66,158,68,147,69,227,184,245,25,113,191,40,231,178,73,89,6,97,117,185,202,32,137,78,4,159,197,114,9,240,130,167,49,202,184,21,144,70,161,47,227,211,11,0,98,140,51,25,74,194,69,22,207,158,108,65,26,198,136,17,185,221,10,52,254,65,136,54,137,248,167,148,189,191,186,164,109,175,147,115,141,95,167,213,2,63,0,100,16,15,219,109,91,63,4,83,49,81,243,222,47,Line truncated
static const unsigned char v3[] = {31,139,8,0,0,0,0,0,0,3,109,83,201,110,219,48,16,189,231,43,166,188,240,208,136,218,23,7,162,129,52,205,161,135,162,61,180,69,123,100,36,218,98,194,197,37,105,43,254,251,82,150,237,36,78,1,129,51,122,243,102,33,103,166,253,240,249,219,221,143,63,223,239,97,240,74,46,175,218,73,128,100,122,77,17,215,8,58,201,156,163,104,136,86,91,41,225,97,29,141,131,240,28,45,175,0,218,129,179,126,82,130,234,133,151,124,217,198,179,156,49,197,61,131,110,96,214,113,79,209,214,175,162,6,65,252,218,56,120,191,137,248,223,173,216,81,244,59,250,121,27,221,25,181,97,94,60,72,30,50,27,237,185,14,158,95,238,41,239,215,252,194,87,51,197,41,218,9,62,110,140,245,175,232,163,232,253,64,123,190,19,29,143,14,63,215,32,180,240,130,201,200,117,76,114,154,146,228,37,152,20,250,9,44,151,20,137,16,2,129,223,111,66,92,161,216,154,199,110,183,254,248,172,36,130,193,242,21,69,61,243,236,230,141,229,186,13,10,4,69,59,138,167,219,220,196,241,56,142,100,204,137,177,235,56,75,146,100,162,98,88,9,41,41,214,70,115,12,83,205,159,204,51,197,9,36,144,21,225,195,224,188,53,79,199,114,41,78,73,121,130,40,238,182,214,134,139,221,25,105,44,94,66,27,30,104,56,241,67,241,188,99,27,138,173,217,234,30,191,134,31,141,208,103,188,167,248,107,90,144,166,172,33,173,73,210,100,44,203,73,83,52,112,20,161,146,164,36,69,89,68,41,201,211,219,134,44,170,26,230,51,152,210,180,129,5,169,203,93,68,234,95,139,219,10,170,131,67,5,139,93,64,217,37,59,202,66,140,12,42,146,100,89,151,146,58,207,73,85,64,78,202,10,194,203,55,37,76,153,74,152,50,169,146,212,105,1,9,203,10,146,5,236,40,14,81,142,166,51,37,135,60,24,210,179,1,135,22,66,59,61,239,242,162,155,115,183,166,118,184,208,15,235,148,35,138,199,34,204,135,157,79,210,57,135,230,166,59,191,151,220,13,156,251,99,144,54,62,141,117,251,96,250,253,219,5,64,97,196,39,244,96,118,157,21,27,15,206,118,47,201,186,94,19,207,132,28,133,238,67,18,210,25,53,249,204,212,247,94,194,121,99,247,68,9,77,30,221,255,137,243,60,42,211,111,167,165,56,184,41,246,142,31,170,62,172,239,63,221,71,42,213,207,3,0,0,0};
static const unsigned char v4[] = {31,139,8,0,0,0,0,0,0,3,189,91,233,114,219,72,146,254,239,167,168,230,184,155,164,155,0,9,82,151,105,81,29,62,219,158,112,219,14,75,118,108,143,66,225,6,137,34,137,22,174,0,64,145,28,13,223,105,159,97,159,108,191,204,194,81,32,33,74,125,236,206,168,105,28,85,89,89,89,121,124,153,85,232,118,133,248,240,241,226,245,80,60,255,244,78,76,108,207,75,132,191,72,82,145,164,118,156,138,165,155,206,69,211,142,220,110,83,184,129,8,99,71,198,34,13,69,34,227,27,41,210,185,20,118,20,9,59,21,118,176,22,95,62,191,123,244,168,185,72,36,58,199,238,36,109,62,123,228,250,81,8,50,183,98,222,17,177,12,208,187,35,208,224,60,181,83,201,87,175,167,83,57,73,249,242,179,156,118,196,60,245,189,142,248,28,46,82,12,180,17,211,56,244,133,104,154,221,241,34,112,60,105,254,158,232,68,223,77,194,32,233,136,247,225,204,13,58,226,92,166,169,27,204,58,226,197,34,77,67,122,128,81,58,34,117,163,151,161,23,198,104,200,255,74,167,35,62,132,169,59,117,39,118,234,82,187,79,54,250,103,215,95,34,47,180,157,55,174,39,21,149,156,7,176,48,9,49,110,32,131,52,81,108,60,162,209,83,26,61,20,35,17,197,97,148,136,209,25,207,224,183,211,228,102,38,38,158,157,36,163,199,183,252,202,228,187,141,88,249,94,144,140,26,243,52,141,134,221,238,114,185,52,151,3,51,140,103,221,126,175,215,235,162,91,67,220,184,114,249,34,92,141,26,61,209,19,86,223,60,57,230,223,195,198,217,169,35,167,201,217,105,146,174,61,121,102,122,158,49,241,18,195,186,157,186,158,55,12,192,219,51,8,62,188,150,195,127,128,86,118,109,248,46,68,233,185,248,103,104,21,15,151,174,147,206,135,61,243,48,90,61,219,156,118,21,193,211,174,34,63,19,174,51,106,188,183,215,50,254,214,111,8,199,78,109,35,176,125,153,61,19,253,70,181,141,101,212,181,178,208,42,178,161,62,74,12,141,156,91,52,29,53,126,193,132,142,250,29,203,60,233,127,61,49,159,90,207,45,243,240,164,195,63,61,252,223,234,88,248,235,153,7,39,111,15,108,203,60,56,232,240,15,191,50,44,195,28,28,63,55,143,158,226,47,107,13,233,160,73,207,51,76,188,180,250,182,121,2,202,86,214,222,180,14,13,80,250,122,104,30,30,227,205,49,254,178,110,230,201,145,129,255,222,30,152,199,131,175,199,102,255,4,175,143,240,199,175,123,29,190,57,124,251,212,60,32,138,135,248,43,94,128,226,201,225,215,129,121,112,248,188,210,5,60,91,131,206,160,99,30,31,225,175,120,200,12,218,102,255,41,254,212,67,98,19,255,209,188,158,170,31,245,152,39,247,182,111,14,158,126,37,225,144,92,142,59,252,163,88,62,232,152,253,195,183,150,181,243,162,20,232,191,26,221,189,146,39,177,42,225,126,181,118,5,143,213,96,90,111,107,135,199,224,88,26,76,252,233,193,46,7,232,128,137,130,125,208,176,171,19,179,168,239,224,216,195,172,77,203,214,164,131,199,150,101,90,7,154,20,233,209,129,121,112,156,175,72,33,120,203,80,55,160,111,13,242,229,44,133,111,168,101,57,122,75,203,162,47,52,189,161,102,95,177,146,186,106,96,33,173,67,136,1,92,177,210,148,26,69,111,6,166,101,117,170,186,215,83,179,96,1,119,103,217,127,48,217,179,223,224,13,166,139,96,66,62,68,188,149,54,252,92,235,214,131,99,88,40,215,6,175,151,200,244,124,30,46,207,93,71,142,109,186,47,111,54,109,113,251,72,192,63,166,139,56,80,254,227,209,169,227,222,228,235,55,158,25,203,57,172,24,110,213,157,92,175,225,127,35,163,39,254,109,92,30,156,92,137,213,210,152,46,60,79,140,217,55,27,99,17,173,141,190,120,124,171,209,23,63,252,32,154,145,103,28,247,155,27,145,198,118,144,184,196,168,1,103,47,156,69,204,158,207,24,244,122,234,221,52,140,253,198,25,248,209,89,136,86,32,154,141,132,1,122,194,167,159,169,39,87,2,140,249,137,49,129,95,148,49,247,67,207,177,242,157,233,58,130,59,80,55,13,17,6,19,15,252,195,33,202,27,114,148,85,137,180,248,217,119,55,237,77,62,102,42,87,169,145,120,136,20,198,65,175,151,145,6,241,199,183,236,247,77,116,74,6,69,235,185,113,212,16,221,108,252,110,126,161,77,129,153,165,31,195,18,51,59,50,86,198,1,88,240,166,6,92,162,76,39,115,225,205,134,234,249,81,57,150,214,63,150,96,197,69,212,211,8,193,197,229,67,213,12,166,75,166,24,178,102,20,116,77,34,59,168,206,219,23,219,243,135,62,205,164,67,97,216,78,134,88,97,210,171,141,54,126,149,131,185,235,56,50,160,225,198,94,56,185,166,139,185,26,126,105,68,43,126,62,51,102,177,13,109,1,113,97,199,174,109,168,62,224,32,94,200,202,212,88,234,42,32,66,131,220,212,35,47,207,234,221,16,46,22,99,148,175,137,210,249,141,182,214,249,147,82,76,221,234,42,241,63,244,3,35,218,232,118,148,43,198,237,34,246,148,189,100,134,162,226,238,7,251,230,189,27,92,35,244,182,110,153,165,14,179,2,8,17,19,144,64,39,52,207,227,113,166,206,217,192,54,183,25,53,254,241,248,150,46,54,141,92,104,234,94,140,70,212,93,252,36,154,144,145,90,129,195,158,90,143,177,183,144,198,17,108,101,22,135,139,168,41,134,162,201,207,89,146,199,120,62,15,111,100,60,172,182,85,207,114,121,31,230,157,55,74,149,148,58,12,4,158,1,32,57,134,239,136,8,214,150,171,129,7,119,2,88,99,28,137,105,24,224,137,244,221,113,232,57,186,61,208,188,11,67,88,162,37,25,67,33,240,199,74,60,155,92,232,133,212,33,240,253,94,231,198,13,61,153,26,22,77,33,49,104,18,158,189,214,46,141,48,146,193,144,189,6,11,105,101,244,10,133,161,25Line truncated
static const unsigned char v5[] = {45,45,45,45,45,66,69,71,73,78,32,67,69,82,84,73,70,73,67,65,84,69,45,45,45,45,45,10,77,73,73,66,67,84,67,66,115,65,73,74,65,75,57,119,98,73,68,107,72,110,65,111,77,65,111,71,67,67,113,71,83,77,52,57,66,65,77,67,77,65,48,120,67,122,65,74,66,103,78,86,66,65,89,84,65,107,108,70,77,66,52,88,10,68,84,73,122,77,68,69,121,79,84,73,120,77,106,69,122,79,70,111,88,68,84,77,122,77,68,69,121,78,106,73,120,77,106,69,122,79,70,111,119,68,84,69,76,77,65,107,71,65,49,85,69,66,104,77,67,83,85,85,119,87,84,65,84,10,66,103,99,113,104,107,106,79,80,81,73,66,66,103,103,113,104,107,106,79,80,81,77,66,66,119,78,67,65,65,82,122,83,81,83,53,79,72,100,49,55,108,85,101,78,73,43,54,107,112,57,87,89,117,48,99,120,117,69,73,105,47,74,84,10,106,112,104,98,67,109,100,74,68,49,99,85,118,104,109,122,77,57,47,112,104,118,74,84,57,107,97,49,48,90,57,116,111,90,104,103,110,66,113,48,111,48,120,102,84,81,52,106,67,49,118,119,77,65,111,71,67,67,113,71,83,77,52,57,10,66,65,77,67,65,48,103,65,77,69,85,67,73,81,67,101,48,84,50,69,48,71,79,105,86,101,57,75,119,118,73,69,80,101,88,49,74,49,74,48,84,55,84,78,97,99,103,82,48,89,97,51,51,72,86,57,86,103,73,103,78,118,100,110,10,97,69,87,105,66,112,49,120,115,104,115,52,105,122,54,87,98,112,120,114,83,49,73,72,117,99,114,113,107,90,117,74,76,102,78,90,71,90,73,61,10,45,45,45,45,45,69,78,68,32,67,69,82,84,73,70,73,67,65,84,69,45,45,45,45,45,10,0};
static const unsigned char v6[] = {45,45,45,45,45,66,69,71,73,78,32,69,67,32,80,82,73,86,65,84,69,32,75,69,89,45,45,45,45,45,10,77,72,99,67,65,81,69,69,73,67,66,122,51,72,79,107,81,76,80,66,68,116,100,107,110,113,67,55,107,49,80,78,115,87,106,54,72,102,104,121,78,66,53,77,101,110,102,106,109,113,105,111,111,65,111,71,67,67,113,71,83,77,52,57,10,65,119,69,72,111,85,81,68,81,103,65,69,99,48,107,69,117,84,104,51,100,101,53,86,72,106,83,80,117,112,75,102,86,109,76,116,72,77,98,104,67,73,118,121,85,52,54,89,87,119,112,110,83,81,57,88,70,76,52,90,115,122,80,102,10,54,89,98,121,85,47,90,71,116,100,71,102,98,97,71,89,89,74,119,97,116,75,78,77,88,48,48,79,73,119,116,98,56,65,61,61,10,45,45,45,45,45,69,78,68,32,69,67,32,80,82,73,86,65,84,69,32,75,69,89,45,45,45,45,45,10,0};
const struct mg_mem_file mg_packed_files[] = {
{"/web_root/bundle.js.gz", v0, sizeof(v0) - 1, 1740675004},
{"/web_root/components.js.gz", v1, sizeof(v1) - 1, 1740675004},
{"/web_root/history.min.js.gz", v2, sizeof(v2) - 1, 1740675004},
{"/web_root/index.html.gz", v3, sizeof(v3) - 1, 1769604192},
{"/web_root/main.js.gz", v4, sizeof(v4) - 1, 1740675004},
{"/certs/server_cert.pem", v5, sizeof(v5) - 1, 1740675004},
{"/certs/server_key.pem", v6, sizeof(v6) - 1, 1740675004},
static const struct packed_file {
const char *name;
const unsigned char *data;
size_t size;
time_t mtime;
} packed_files[] = {
{"/web_root/bundle.js.gz", v0, sizeof(v0) - 1, 1752671662},
{"/web_root/components.js.gz", v1, sizeof(v1) - 1, 1752671662},
{"/web_root/history.min.js.gz", v2, sizeof(v2) - 1, 1752671662},
{"/web_root/index.html.gz", v3, sizeof(v3) - 1, 1753452141},
{"/web_root/main.js.gz", v4, sizeof(v4) - 1, 1752671662},
{"/certs/server_cert.pem", v5, sizeof(v5) - 1, 1752671662},
{"/certs/server_key.pem", v6, sizeof(v6) - 1, 1752671662},
{NULL, NULL, 0, 0}
};
static int scmp(const char *a, const char *b) {
while (*a && (*a == *b)) a++, b++;
return *(const unsigned char *) a - *(const unsigned char *) b;
}
const char *mg_unlist(size_t no) {
return packed_files[no].name;
}
const char *mg_unpack(const char *name, size_t *size, time_t *mtime) {
const struct packed_file *p;
for (p = packed_files; p->name != NULL; p++) {
if (scmp(p->name, name) != 0) continue;
if (size != NULL) *size = p->size;
if (mtime != NULL) *mtime = p->mtime;
return (const char *) p->data;
}
return NULL;
};
+1 -1
View File
@@ -5,7 +5,7 @@ SOURCES = main.c mongoose.c packed_fs.c # Source code files, packed_fs.c c
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1
CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_PACKED_FS=1
# See tutorial at https://mongoose.ws/tutorials/http-proxy-client/
ARGS ?= 167.235.63.238:3128 http://info.cern.ch/ # default call arguments
+1 -1
View File
@@ -5,7 +5,7 @@ SOURCES = main.c mongoose.c packed_fs.c # Source code files, packed_fs.c c
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_IO_SIZE=128 -DMG_ENABLE_LINES=1
CFLAGS_MONGOOSE += -DMG_IO_SIZE=128 -DMG_ENABLE_LINES=1 -DMG_ENABLE_PACKED_FS=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
@@ -5,6 +5,7 @@
#define MG_ENABLE_DRIVER_IMXRT10 1 // Enable RTxx driver
#define MG_ENABLE_CUSTOM_MILLIS 1 // Let user implement mg_millis()
#define MG_ENABLE_POSIX_FS 0 // Disable POSIX filesystem
#define MG_ENABLE_PACKED_FS 1 // Enable packed filesystem
#define HTTP_URL "http://0.0.0.0"
#define HTTPS_URL "https://0.0.0.0"
@@ -5,7 +5,7 @@ SOURCES = main.c mongoose.c packed_fs.c # Source code files, packed_fs.c c
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1
CFLAGS_MONGOOSE += -DMG_ENABLE_LINES=1 -DMG_ENABLE_PACKED_FS=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
+1 -1
View File
@@ -5,7 +5,7 @@ SOURCES = main.c mongoose.c net.c packed_fs.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
CFLAGS_MONGOOSE +=
CFLAGS_MONGOOSE += -DMG_ENABLE_PACKED_FS=1 -DMG_ENABLE_LINES=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG ?= example.exe # Use .exe suffix for the binary
@@ -1,2 +1,3 @@
#define MG_ARCH MG_ARCH_ESP32
#define MG_ENABLE_PACKED_FS 1
-1
View File
@@ -225,7 +225,6 @@ void uart_bridge_fn(struct mg_connection *c, int ev, void *ev_data) {
#if 1
opts.root_dir = "/web_root";
opts.fs = &mg_fs_packed;
mg_mem_files = mg_packed_files;
#else
opts.root_dir = "web_root";
#endif
+71 -38
View File
@@ -1,7 +1,43 @@
#include "mongoose.h"
#include <stddef.h>
#include <string.h>
#include <time.h>
#if defined(__cplusplus)
extern "C" {
#endif
const char *mg_unlist(size_t no);
const char *mg_unpack(const char *, size_t *, time_t *);
#if defined(__cplusplus)
}
#endif
static const unsigned char v1[] = {
31, 139, 8, 8, 61, 100, 194, 105, 0, 3, 109, 97, // ....=d.i..ma
31, 139, 8, 8, 67, 234, 193, 103, 0, 3, 105, 110, // ....C..g..in
100, 101, 120, 46, 104, 116, 109, 108, 0, 93, 144, 177, // dex.html.]..
78, 196, 48, 12, 134, 247, 123, 138, 144, 153, 180, 176, // N.0...{.....
49, 36, 149, 208, 245, 6, 38, 24, 64, 130, 49, 77, // 1$....&.@.1M
124, 23, 67, 154, 148, 196, 237, 169, 111, 79, 218, 30, // |.C.....oO..
226, 196, 100, 255, 246, 103, 203, 254, 229, 77, 251, 188, // ..d..g...M..
127, 253, 120, 57, 48, 71, 189, 111, 118, 114, 9, 204, // ..x90G.ovr..
235, 112, 82, 28, 2, 111, 118, 140, 73, 7, 218, 46, // .pR..ov.I...
73, 73, 9, 201, 67, 211, 194, 132, 6, 88, 171, 179, // II..C....X..
235, 162, 78, 86, 214, 91, 125, 99, 122, 32, 205, 140, // ..NV.[}cz ..
211, 41, 3, 41, 62, 210, 81, 60, 112, 86, 95, 55, // .).)>.Q<pV_7
29, 209, 32, 224, 123, 196, 73, 241, 119, 241, 246, 40, // .. .{.I.w..(
246, 177, 31, 52, 97, 231, 129, 51, 19, 3, 65, 40, // ...4a..3..A(
147, 79, 7, 5, 246, 4, 255, 102, 131, 238, 65, 241, // .O.....f..A.
9, 225, 60, 196, 68, 87, 248, 25, 45, 57, 101, 215, // ..<.DW..-9e.
211, 196, 42, 110, 25, 6, 36, 212, 94, 100, 163, 61, // ..*n..$.^d.=
168, 251, 234, 238, 111, 153, 199, 240, 197, 18, 120, 197, // ....o.....x.
51, 205, 30, 178, 3, 40, 219, 92, 130, 227, 165, 82, // 3....(.....R
153, 156, 47, 184, 172, 127, 45, 144, 93, 180, 115, 35, // ../...-.].s#
235, 53, 44, 58, 155, 132, 3, 49, 154, 135, 114, 85, // .5,:...1..rU
31, 237, 184, 188, 144, 147, 41, 66, 99, 168, 62, 51, // ......)Bc.>3
47, 244, 6, 21, 115, 235, 205, 228, 31, 137, 226, 92, // /...s.......
130, 117, 1, 0, 0, 0 // .u...
};
static const unsigned char v2[] = {
31, 139, 8, 8, 67, 234, 193, 103, 0, 3, 109, 97, // ....C..g..ma
105, 110, 46, 106, 115, 0, 181, 88, 109, 111, 219, 70, // in.js..Xmo.F
18, 254, 174, 95, 49, 80, 125, 37, 121, 165, 72, 43, // ..._1P}%y.H+
113, 225, 131, 44, 235, 144, 6, 45, 112, 135, 38, 233, // q..,...-p.&.
@@ -165,10 +201,10 @@ static const unsigned char v1[] = {
106, 14, 189, 187, 24, 169, 117, 130, 89, 191, 113, 150, // j.....u.Y.q.
114, 18, 117, 139, 172, 102, 133, 109, 199, 246, 171, 60, // r.u..f.m...<
199, 81, 34, 226, 97, 169, 86, 130, 158, 26, 220, 113, // .Q".a.V....q
154, 248, 11, 218, 252, 214, 171, 12, 23, 0, 0,// ...........
154, 248, 11, 218, 252, 214, 171, 12, 23, 0, 0, 0 // ...........
};
static const unsigned char v2[] = {
31, 139, 8, 8, 61, 100, 194, 105, 0, 3, 112, 114, // ....=d.i..pr
static const unsigned char v3[] = {
31, 139, 8, 8, 67, 234, 193, 103, 0, 3, 112, 114, // ....C..g..pr
101, 97, 99, 116, 46, 109, 105, 110, 46, 106, 115, 0, // eact.min.js.
157, 91, 123, 119, 219, 182, 146, 255, 127, 63, 69, 164, // .[{w.....?E.
211, 163, 18, 43, 68, 177, 147, 182, 187, 75, 5, 213, // ...+D....K..
@@ -611,35 +647,10 @@ static const unsigned char v2[] = {
77, 151, 97, 116, 45, 181, 118, 45, 118, 85, 153, 107, // M.at-.v-vU.k
232, 188, 93, 25, 184, 54, 206, 156, 124, 141, 179, 51, // ..]..6..|..3
14, 139, 221, 126, 250, 31, 255, 11, 22, 19, 178, 116, // ...~.......t
138, 51, 0, 0,// .3..
};
static const unsigned char v3[] = {
31, 139, 8, 8, 61, 100, 194, 105, 0, 3, 105, 110, // ....=d.i..in
100, 101, 120, 46, 104, 116, 109, 108, 0, 93, 144, 177, // dex.html.]..
78, 196, 48, 12, 134, 247, 123, 138, 144, 153, 180, 176, // N.0...{.....
49, 36, 149, 208, 245, 6, 38, 24, 64, 130, 49, 77, // 1$....&.@.1M
124, 23, 67, 154, 148, 196, 237, 169, 111, 79, 218, 30, // |.C.....oO..
226, 196, 100, 255, 246, 103, 203, 254, 229, 77, 251, 188, // ..d..g...M..
127, 253, 120, 57, 48, 71, 189, 111, 118, 114, 9, 204, // ..x90G.ovr..
235, 112, 82, 28, 2, 111, 118, 140, 73, 7, 218, 46, // .pR..ov.I...
73, 73, 9, 201, 67, 211, 194, 132, 6, 88, 171, 179, // II..C....X..
235, 162, 78, 86, 214, 91, 125, 99, 122, 32, 205, 140, // ..NV.[}cz ..
211, 41, 3, 41, 62, 210, 81, 60, 112, 86, 95, 55, // .).)>.Q<pV_7
29, 209, 32, 224, 123, 196, 73, 241, 119, 241, 246, 40, // .. .{.I.w..(
246, 177, 31, 52, 97, 231, 129, 51, 19, 3, 65, 40, // ...4a..3..A(
147, 79, 7, 5, 246, 4, 255, 102, 131, 238, 65, 241, // .O.....f..A.
9, 225, 60, 196, 68, 87, 248, 25, 45, 57, 101, 215, // ..<.DW..-9e.
211, 196, 42, 110, 25, 6, 36, 212, 94, 100, 163, 61, // ..*n..$.^d.=
168, 251, 234, 238, 111, 153, 199, 240, 197, 18, 120, 197, // ....o.....x.
51, 205, 30, 178, 3, 40, 219, 92, 130, 227, 165, 82, // 3....(.....R
153, 156, 47, 184, 172, 127, 45, 144, 93, 180, 115, 35, // ../...-.].s#
235, 53, 44, 58, 155, 132, 3, 49, 154, 135, 114, 85, // .5,:...1..rU
31, 237, 184, 188, 144, 147, 41, 66, 99, 168, 62, 51, // ......)Bc.>3
47, 244, 6, 21, 115, 235, 205, 228, 31, 137, 226, 92, // /...s.......
130, 117, 1, 0, 0,// .u...
138, 51, 0, 0, 0 // .3..
};
static const unsigned char v4[] = {
31, 139, 8, 8, 61, 100, 194, 105, 0, 3, 115, 116, // ....=d.i..st
31, 139, 8, 8, 67, 234, 193, 103, 0, 3, 115, 116, // ....C..g..st
121, 108, 101, 46, 99, 115, 115, 0, 149, 85, 193, 142, // yle.css..U..
155, 48, 16, 189, 231, 43, 92, 173, 42, 181, 171, 192, // .0...+..*...
134, 16, 96, 33, 151, 222, 250, 17, 85, 15, 6, 155, // ..`!....U...
@@ -707,14 +718,36 @@ static const unsigned char v4[] = {
164, 9, 220, 6, 95, 161, 120, 245, 2, 113, 66, 79, // ...._.x..qBO
181, 251, 194, 222, 28, 143, 16, 202, 223, 43, 229, 126, // .........+.~
66, 50, 118, 143, 86, 46, 125, 129, 23, 255, 0, 132, // B2v.V.}.....
122, 103, 55, 254, 7, 0, 0,// zg7....
122, 103, 55, 254, 7, 0, 0, 0 // zg7....
};
const struct mg_mem_file mg_packed_files[] = {
{"/web_root/main.js.gz", v1, sizeof(v1), 1774347325},
{"/web_root/preact.min.js.gz", v2, sizeof(v2), 1774347325},
{"/web_root/index.html.gz", v3, sizeof(v3), 1774347325},
{"/web_root/style.css.gz", v4, sizeof(v4), 1774347325},
static const struct packed_file {
const char *name;
const unsigned char *data;
size_t size;
time_t mtime;
} packed_files[] = {
{"/web_root/index.html.gz", v1, sizeof(v1), 1740761667},
{"/web_root/main.js.gz", v2, sizeof(v2), 1740761667},
{"/web_root/preact.min.js.gz", v3, sizeof(v3), 1740761667},
{"/web_root/style.css.gz", v4, sizeof(v4), 1740761667},
{NULL, NULL, 0, 0}
};
static int scmp(const char *a, const char *b) {
while (*a && (*a == *b)) a++, b++;
return *(const unsigned char *) a - *(const unsigned char *) b;
}
const char *mg_unlist(size_t no) {
return packed_files[no].name;
}
const char *mg_unpack(const char *name, size_t *size, time_t *mtime) {
const struct packed_file *p;
for (p = packed_files; p->name != NULL; p++) {
if (scmp(p->name, name) != 0) continue;
if (size != NULL) *size = p->size - 1;
if (mtime != NULL) *mtime = p->mtime;
return (const char *) p->data;
}
return NULL;
}
+10 -3
View File
@@ -1,14 +1,16 @@
PROG ?= ./example # Program we are building
PACK ?= ./pack # Packing executable
DELETE = rm -rf # Command to remove files
OUT ?= -o $(PROG) # Compiler argument for output file
SOURCES = main.c mongoose.c net.c packed_fs.c # Source code files
SOURCES = main.c mongoose.c net.c # Source code files
CFLAGS = -W -Wall -Wextra -g -I. # Build options
# Mongoose build options. See https://mongoose.ws/documentation/#build-options
# CFLAGS_MONGOOSE +=
CFLAGS_MONGOOSE += # -DMG_ENABLE_PACKED_FS=1
ifeq ($(OS),Windows_NT) # Windows settings. Assume MinGW compiler. To use VC: make CC=cl CFLAGS=/MD OUT=/Feprog.exe
PROG = example.exe # Use .exe suffix for the binary
PACK = pack.exe # Packing executable
CC = gcc # Use MinGW gcc compiler
CFLAGS += -lws2_32 # Link against Winsock library
DELETE = cmd /C del /Q /F /S # Command prompt command to delete files
@@ -22,10 +24,15 @@ web_root/bundle.js:
curl -s https://npm.reversehttp.com/preact,preact/hooks,htm/preact,preact-router -o $@
packed_fs.c: $(wildcard web_root/*) Makefile web_root/bundle.js
node pack.js $(addsuffix ::gzip, $(wildcard web_root/*)) > $@
$(CC) ../../../test/pack.c -o $(PACK)
$(PACK) $(wildcard web_root/*) > $@
$(PROG): $(SOURCES) # Build program from sources
$(CC) $(SOURCES) $(CFLAGS) $(CFLAGS_MONGOOSE) $(CFLAGS_EXTRA) $(OUT)
clean: # Cleanup. Delete built program and all build artifacts
$(DELETE) $(PROG) $(PACK) *.o *.obj *.exe *.dSYM
mbedtls: # Pull and build mbedTLS library. See see https://mongoose.ws/tutorials/tls/#how-to-build
git clone --depth 1 -b v2.28.2 https://github.com/mbed-tls/mbedtls $@
$(MAKE) -C mbedtls/library
+4 -1
View File
@@ -307,9 +307,12 @@ static void fn(struct mg_connection *c, int ev, void *ev_data) {
} else {
struct mg_http_serve_opts opts;
memset(&opts, 0, sizeof(opts));
#if MG_ENABLE_PACKED_FS
opts.root_dir = "/web_root";
opts.fs = &mg_fs_packed;
mg_mem_files = mg_packed_files;
#else
opts.root_dir = "web_root";
#endif
mg_http_serve_dir(c, ev_data, &opts);
}
MG_DEBUG(("%lu %.*s %.*s -> %.*s", c->id, (int) hm->method.len,
@@ -1 +0,0 @@
../../../test/pack.js
File diff suppressed because it is too large. Load diff