Hey All!
Need some advice please. I’m trying to embed bootstrap into a wireless microcontroller (ESP8266)
I already managed to get it working but making use of a CDN instead of local CSS. I will not need the bootstrap Java script.
But ideally it must be available locally other wise the device cannot be used when the client does not have internet.
The ESP module has 4MB of flash space available and its chip has plenty power to handle a small single client web server.
The Challenge.
I have to put the CSS and HTML code into a string and then write the string to the ESP8266 web server output function.
I cannot simply place the .min.css version of bootstrap into one long line. I will get a string space related error.
I am however able to break it up in chunks and then send it in pieces (VERY MESSY CODE). I would like to approach it with a slightly more clever way.
I want to try use my own kind of compression. Base64 seems like a bad idea (If I even may call it compression) other types of compression is just plain confusing for me to implement.
So my Idea is to create an index of special characters that goes beyond ASCII (127) . And Assign those to commonly used HTML and CSS tags.
That way I can for instance replace things like <body with a special character. Or even pack string numbers larger than 3 digits Then only when I’m writing to the Web server output function do I “decompress” it.
How would you go about it. ?
Need some advice please. I’m trying to embed bootstrap into a wireless microcontroller (ESP8266)
I already managed to get it working but making use of a CDN instead of local CSS. I will not need the bootstrap Java script.
But ideally it must be available locally other wise the device cannot be used when the client does not have internet.
The ESP module has 4MB of flash space available and its chip has plenty power to handle a small single client web server.
The Challenge.
I have to put the CSS and HTML code into a string and then write the string to the ESP8266 web server output function.
I cannot simply place the .min.css version of bootstrap into one long line. I will get a string space related error.
I am however able to break it up in chunks and then send it in pieces (VERY MESSY CODE). I would like to approach it with a slightly more clever way.
I want to try use my own kind of compression. Base64 seems like a bad idea (If I even may call it compression) other types of compression is just plain confusing for me to implement.
So my Idea is to create an index of special characters that goes beyond ASCII (127) . And Assign those to commonly used HTML and CSS tags.
That way I can for instance replace things like <body with a special character. Or even pack string numbers larger than 3 digits Then only when I’m writing to the Web server output function do I “decompress” it.
How would you go about it. ?


