function checkDupes(symbols, length) {
    for (let /** @type{number} */ i = 0; i < length - 1; ++i) {
      for (let /** @type{number} */ j = i + 1; j < length; ++j) {
        if (symbols[i] == symbols[j]) {
          throw "Duplicate simple Huffman code symbol";
        }
      }
    }
  }
@param {!Int32Array} symbols
@param {number} length
@return {void}