function amfXDecodeOne(rules, buffer) {
  if (!rules[buffer.readUInt8(0)]) {
    logger.error("Unknown field", buffer.readUInt8(0));
    return null;
  }
  return rules[buffer.readUInt8(0)](buffer);
}
Decode one value from the Buffer according to the applied rules
@param {Array} rules
@param {Buffer} buffer
@returns {*}