function deserializeTCompactProtocol(reader) {
  let lastFid = 0
  /** @type {ThriftObject} */
  const value = {}

  while (reader.offset < reader.view.byteLength) {
    // Parse each field based on its type and add to the result object
    const [type, fid, newLastFid] = readFieldBegin(reader, lastFid)
    lastFid = newLastFid

    if (type === CompactType.STOP) {
      break
    }

    // Handle the field based on its type
    value[`field_${fid}`] = readElement(reader, type)
  }

  return value
}
Parse TCompactProtocol

@param {DataReader} reader
@returns {{ [key: `field_${number}`]: any }}