code: function readNumber(bf, numfmt) {
    var value = new Uint8Array(bf);
    if (numfmt === NUMFMT_UINT32) {
      // uint32
      return uint32BEtoNumber(value);
    } else if (numfmt === NUMFMT_UINT64) {
      // uint64
      return uint64BEtoNumber(value);
    } else if (numfmt === NUMFMT_UINT16) {
      // uint16
      return uint16BEtoNumber(value);
    } else if (numfmt === NUMFMT_UINT8) {
      // uint8
      return uint8BEtoNumber(value);
    }
    return 0;
  
    // return struct.unpack(this._number_format, bf)[0];
  }
docs: read number from buffer
  @param {BufferList} bf number buffer
  @param {string} numfmt number format