function addDecoder(cases, importFn, preferWorker_ = true) {
  if (!Array.isArray(cases)) {
    cases = [cases]; // eslint-disable-line no-param-reassign
  }
  cases.forEach((c) => {
    registry.set(c, importFn);
    preferWorkerMap.set(c, preferWorker_);
  });
}
Register a decoder for a specific compression method or a range of compressions
@param {(NumberOrUndefined|(NumberOrUndefined[]))} cases ids of the compression methods to register for
@param {function():Promise} importFn the function to import the decoder
@param {boolean} preferWorker_ Whether to prefer running the decoder in a worker