lethe wrote:No, the compiler will do this for you, since the hex chars are not quoted. The resulting program will have an array, which is a 1:1 representation of your file's content.
but the final resulting file is so much larger then the original ... original html.gz = 44K ... after hexdump html.hex = 217K ... that is larger then the base64 file html.b64 = 59K ... I am going to guess that that size will be smaller once compiled ... but how much smaller? I think I may have found another solution that maintains the original gzip file size ...
xtensa-lx106-elf-objcopy -I binary -B xtensa -O elf32-xtensa-le html.gz html.o
xtensa-lx106-elf-objdump -x html.o
html.o: file format elf32-xtensa-le
html.o
architecture: xtensa, flags 0x00000010:
HAS_SYMS
start address 0x00000000
Xtensa header:
Machine = Base
Insn tables = false
Literal tables = false
Sections:
Idx Name Size VMA LMA File off Algn
0 .data 0000ad09 00000000 00000000 00000034 2**0
CONTENTS, ALLOC, LOAD, DATA
SYMBOL TABLE:
00000000 l d .data 00000000 .data
00000000 g .data 00000000 _binary_html_gz_start
0000ad09 g .data 00000000 _binary_html_gz_end
0000ad09 g *ABS* 00000000 _binary_html_gz_size
as we can see that once linked with the rest of the program, we should be able to access the data ...
extern char _binary_html_gz_start[];
extern char _binary_html_gz_end[];
#define SIZE_OF_HTML (_binary_html_gz_end - _binary_html_gz_start)
...
foo(_binary_html_gz_start[i]);
lethe wrote:If you want to do more than to serve a single file, you should really have a look at esphttpd
Yes! I have looked into esphttpd as well as WebBase ... both handle httpd server very well ... neither support https (ssl). I am starting this project to create a lighterweight alternative to the full blown web server environment. my main goal here is to provide a small web app configuration utility ... that can be added to various projects ... starting with this ... http://www.esp8266.com/viewtopic.php?f=6&t=1441 ...