amfUtils.js
function amf3decByteArray(buf) {
    var sLen = amf3decUI29(buf);
    var s = sLen & 1; // TODO: Check if we follow the same rule!
    sLen = sLen >> 1; // The real length without the lowest bit
    if (s) return { len: sLen.value + 5, value: buf.slice(5, sLen.value + 5) };
    throw new Error("Error, we have a need to decode a String that is a Reference"); // TODO: Implement references!
}
function amf3decByteArray(buf) {
    var sLen = amf3decUI29(buf);
    var s = sLen & 1; // TODO: Check if we follow the same rule!
    sLen = sLen >> 1; // The real length without the lowest bit
    if (s) return { len: sLen.value + 5, value: buf.slice(5, sLen.value + 5) };
    throw new Error("Error, we have a need to decode a String that is a Reference"); // TODO: Implement references!
}
function amf3decByteArray ( buf ) { var sLen = amf3decUI29 ( buf ) ; var s = sLen & 1 ; // TODO: Check if we follow the same rule! sLen = sLen >> 1 ; // The real length without the lowest bit if ( s ) return { len : sLen . value + 5 , value : buf . slice ( 5 , sLen . value + 5 ) } ; throw new Error ( "Error, we have a need to decode a String that is a Reference" ) ; // TODO: Implement references! }
AMF3 Decide Byte Array
@param buf
@returns {{len: *, value: (Array|string|*|Buffer|Blob)}}
AMF3 Decide Byte Array