function readDataPage(bytes, daph, { type, element, schemaPath }) {
  const view = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength)
  const reader = { view, offset: 0 }
  /** @type {DecodedArray} */
  let dataPage

  // repetition and definition levels
  const repetitionLevels = readRepetitionLevels(reader, daph, schemaPath)
  // assert(!repetitionLevels.length || repetitionLevels.length === daph.num_values)
  const { definitionLevels, numNulls } = readDefinitionLevels(reader, daph, schemaPath)
  // assert(!definitionLevels.length || definitionLevels.length === daph.num_values)

  // read values based on encoding
  const nValues = daph.num_values - numNulls
  if (daph.encoding === 'PLAIN') {
    dataPage = readPlain(reader, type, nValues, element.type_length)
  } else if (
    daph.encoding === 'PLAIN_DICTIONARY' ||
    daph.encoding === 'RLE_DICTIONARY' ||
    daph.encoding === 'RLE'
  ) {
    const bitWidth = type === 'BOOLEAN' ? 1 : view.getUint8(reader.offset++)
    if (bitWidth) {
      dataPage = new Array(nValues)
      if (type === 'BOOLEAN') {
        readRleBitPackedHybrid(reader, bitWidth, 0, dataPage)
        dataPage = dataPage.map(x => !!x) // convert to boolean
      } else {
        // assert(daph.encoding.endsWith('_DICTIONARY'))
        readRleBitPackedHybrid(reader, bitWidth, view.byteLength - reader.offset, dataPage)
      }
    } else {
      dataPage = new Uint8Array(nValues) // nValue zeroes
    }
  } else if (daph.encoding === 'BYTE_STREAM_SPLIT') {
    dataPage = byteStreamSplit(reader, nValues, type, element.type_length)
  } else if (daph.encoding === 'DELTA_BINARY_PACKED') {
    const int32 = type === 'INT32'
    dataPage = int32 ? new Int32Array(nValues) : new BigInt64Array(nValues)
    deltaBinaryUnpack(reader, nValues, dataPage)
  } else if (daph.encoding === 'DELTA_LENGTH_BYTE_ARRAY') {
    dataPage = new Array(nValues)
    deltaLengthByteArray(reader, nValues, dataPage)
  } else {
    throw new Error(`parquet unsupported encoding: ${daph.encoding}`)
  }

  return { definitionLevels, repetitionLevels, dataPage }
}
Read a data page from uncompressed reader.

@param {Uint8Array} bytes raw page data (should already be decompressed)
@param {DataPageHeader} daph data page header
@param {ColumnDecoder} columnDecoder
@returns {DataPage} definition levels, repetition levels, and array of values