code: 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;
  }
docs: Decode a whole buffer of AMF values according to rules and return in array
  @param rules
  @param buffer
  @returns {Array}