• Well, having the compressedData array isn't going to be very efficient as it's just a normal array by the look of it. I'd consider just having a big ArrayBuffer and then use a DataView to set the 3 bytes directly. It even has a setUint16 so you can avoid that shifting you were doing.

About

Avatar for Gordon @Gordon started