amfUtils.js
function amfXDecode(rules, buffer) {
    // We shall receive clean buffer and will respond with an array of values
    var resp = [];
    var res;
    for (var i = 0; i < buffer.length;) {
        res = amfXDecodeOne(rules, buffer.slice(i));
        i += res.len;
        resp.push(res.value); // Add the response
    }
    return resp;
}
function amfXDecode(rules, buffer) {
    // We shall receive clean buffer and will respond with an array of values
    var resp = [];
    var res;
    for (var i = 0; i < buffer.length;) {
        res = amfXDecodeOne(rules, buffer.slice(i));
        i += res.len;
        resp.push(res.value); // Add the response
    }
    return resp;
}
function amfXDecode ( rules , buffer ) { // We shall receive clean buffer and will respond with an array of values var resp = [ ] ; var res ; for ( var i = 0 ; i < buffer . length ; ) { res = amfXDecodeOne ( rules , buffer . slice ( i ) ) ; i += res . len ; resp . push ( res . value ) ; // Add the response } return resp ; }
Decode a whole buffer of AMF values according to rules and return in array
@param rules
@param buffer
@returns {Array}
Decode a whole buffer of AMF values according to rules and return in array