async _createTexture(buffer, config = {}) {
    const container = (0,_libs_ktx_parse_module_js__WEBPACK_IMPORTED_MODULE_2__.read)(new Uint8Array(buffer));

    // Basis UASTC HDR is a subset of ASTC, which can be transcoded efficiently
    // to BC6H. To detect whether a KTX2 file uses Basis UASTC HDR, or default
    // ASTC, inspect the DFD color model.
    //
    // Source: https://github.com/BinomialLLC/basis_universal/issues/381
    const isBasisHDR = container.vkFormat === _libs_ktx_parse_module_js__WEBPACK_IMPORTED_MODULE_2__.VK_FORMAT_ASTC_4x4_SFLOAT_BLOCK_EXT && container.dataFormatDescriptor[0].colorModel === 0xA7;

    // If the device supports ASTC, Basis UASTC HDR requires no transcoder.
    const needsTranscoder = container.vkFormat === _libs_ktx_parse_module_js__WEBPACK_IMPORTED_MODULE_2__.VK_FORMAT_UNDEFINED || isBasisHDR && !this.workerConfig.astcHDRSupported;
    if (!needsTranscoder) {
      return createRawTexture(container);
    }

    //
    const taskConfig = config;
    const texturePending = this.init().then(() => {
      return this.workerPool.postMessage({
        type: 'transcode',
        buffer,
        taskConfig: taskConfig
      }, [buffer]);
    }).then(e => this._createTextureFrom(e.data, container));

    // Cache the task result.
    _taskCache.set(buffer, {
      promise: texturePending
    });
    return texturePending;
  }
@param {ArrayBuffer} buffer
@param {object?} config
@return {Promise<CompressedTexture|CompressedArrayTexture|DataTexture|Data3DTexture>}