JavaScript port of ActionScript 3.0 byte array. Supports AMF2 and AMF3 formats.