• Compressed objects.

    The item.wget() allows web assets to be fetched and stored:

    fs.item('/css/bootstrap.min.css').wget('­http://www.espruino.com/css/bootstrap.mi­n.css',{compress:'gzip'});
    

    With the compress options, the headers are modfied and the content is compressed, and this is what is sorted in flash.

    When the webserver .pipe method retrieves the object, it is sent back compressed to the browser and the browser unzips on the fly. This means that we don't need gzip/ungzip libraries for espurino, but can store large libraries for the browser front end efficiently with no overhead.

    It's not particularly quick - just under 9 secs to load.However it means a web server can be set up in AP mode, and not be connected to the internet, and have bootstrap.css!

About

Avatar for Wilberforce @Wilberforce started