It would need base64 as input for the encoding and the result of that is input for the decoding.
The encoding step basicly substitutes the numbers with some characters outside of the base64 alphabet and then does a runlength encoding. I never tried the encoding step in espruino though.
To give a little background.. i recently got a eink display (waveshare 4.2 inch) and i wanted to display full size (400x300) images with espruino. The output of the common img2lcd tool was
to big because of all the overhead of hex notation, commas, spaces and line breaks. The image
information itself is just 15k bytes but in this representation its close to 80k bytes. So i base64 encoded the image which gives me 20k bytes which by the way runs just fine. But i saw major potential to further reduce the size with some RLE.
Having any compression/decompression options build in would be nice and if the output of the compression could be an accepted string would be nice for assets.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
It would need base64 as input for the encoding and the result of that is input for the decoding.
The encoding step basicly substitutes the numbers with some characters outside of the base64 alphabet and then does a runlength encoding. I never tried the encoding step in espruino though.
To give a little background.. i recently got a eink display (waveshare 4.2 inch) and i wanted to display full size (400x300) images with espruino. The output of the common img2lcd tool was
to big because of all the overhead of hex notation, commas, spaces and line breaks. The image
information itself is just 15k bytes but in this representation its close to 80k bytes. So i base64 encoded the image which gives me 20k bytes which by the way runs just fine. But i saw major potential to further reduce the size with some RLE.
Having any compression/decompression options build in would be nice and if the output of the compression could be an accepted string would be nice for assets.