function doUseDictionary(s, fence) {
    if (s.distance > 0x7FFFFFFC) {
      throw "Invalid backward reference";
    }
    let /** @type{number} */ address = s.distance - s.maxDistance - 1 - s.cdTotalSize;
    if (address < 0) {
      initializeCompoundDictionaryCopy(s, -address - 1, s.copyLength);
      s.runningState = 14;
    } else {
      let /** @type{!Int8Array} */ dictionaryData = /** @type{!Int8Array} */(data);
      let /** @type{number} */ wordLength = s.copyLength;
      if (wordLength > 31) {
        throw "Invalid backward reference";
      }
      let /** @type{number} */ shift = sizeBits[wordLength];
      if (shift == 0) {
        throw "Invalid backward reference";
      }
      let /** @type{number} */ offset = offsets[wordLength];
      let /** @type{number} */ mask = (1 << shift) - 1;
      let /** @type{number} */ wordIdx = address & mask;
      let /** @type{number} */ transformIdx = address >>> shift;
      offset += wordIdx * wordLength;
      let /** @type{!Transforms} */ transforms = RFC_TRANSFORMS;
      if (transformIdx >= transforms.numTransforms) {
        throw "Invalid backward reference";
      }
      let /** @type{number} */ len = transformDictionaryWord(s.ringBuffer, s.pos, dictionaryData, offset, wordLength, transforms, transformIdx);
      s.pos += len;
      s.metaBlockLength -= len;
      if (s.pos >= fence) {
        s.nextRunningState = 4;
        s.runningState = 12;
        return;
      }
      s.runningState = 4;
    }
  }
@param {!State} s
@param {number} fence
@return {void}