amfUtils.js
function amf3decXmlDoc(buf) {
    var sLen = amf3decUI29(buf);
    var s = sLen & 1;
    sLen = sLen >> 1; // The real length without the lowest bit
    if (s) return { len: sLen.value + 5, value: buf.slice(5, sLen.value + 5).toString('utf8') };
    throw new Error("Error, we have a need to decode a String that is a Reference"); // TODO: Implement references!
}
function amf3decXmlDoc(buf) {
    var sLen = amf3decUI29(buf);
    var s = sLen & 1;
    sLen = sLen >> 1; // The real length without the lowest bit
    if (s) return { len: sLen.value + 5, value: buf.slice(5, sLen.value + 5).toString('utf8') };
    throw new Error("Error, we have a need to decode a String that is a Reference"); // TODO: Implement references!
}
function amf3decXmlDoc ( buf ) { var sLen = amf3decUI29 ( buf ) ; var s = sLen & 1 ; sLen = sLen >> 1 ; // The real length without the lowest bit if ( s ) return { len : sLen . value + 5 , value : buf . slice ( 5 , sLen . value + 5 ) . toString ( 'utf8' ) } ; throw new Error ( "Error, we have a need to decode a String that is a Reference" ) ; // TODO: Implement references! }
AMF3 Decode XMLDoc
@param buf
@returns {{len: *, value: (*|String)}}
AMF3 Decode XMLDoc