• I'd probably do E.mapInPlace(buffer,buffer,function(x){return x-8}) : http://www.espruino.com/Reference#l_E_mapInPlace

    I think that's probably going to be one of the faster methods.

    If you make sure you use Uint8ClampedArray then any value less than 0 won't wrap so will just end up at 0.

About

Avatar for Gordon @Gordon started