import { BinaryDataType } from "../type/BinaryDataType.js";

/**
 * @see https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView
 * @readonly
 * @enum {string}
 */
export const DataType2DataViewReaders = {
    [BinaryDataType.Uint8]: "getUint8",
    [BinaryDataType.Uint16]: "getUint16",
    [BinaryDataType.Uint32]: "getUint32",
    [BinaryDataType.Uint64]: "getUint64",

    [BinaryDataType.Int8]: "getInt8",
    [BinaryDataType.Int16]: "getInt16",
    [BinaryDataType.Int32]: "getInt32",
    [BinaryDataType.Int64]: "getInt64",

    [BinaryDataType.Float32]: "getFloat32",
    [BinaryDataType.Float64]: "getFloat64"
};