List<int> getRepeat(int pos, int wordNum)

Source

List<int> getRepeat(int pos, int wordNum) {
  loadWordIndex();
  int repeat;
  List<int> result;
  if (wordNum < 0xFFF0) {
    if (pos == 0 || _compressed[pos]) {
      int len = _wordLength[pos];
      repeat = (len / 2).floor();
      if (repeat == 0) return null;

      result = new List(repeat);
      int st = _getWordIndex(pos, wordNum);
      for (int i = 0; i < repeat; i++) {
        result[i] = Util.readShort(_wordData, st);
        st += 2;
      }
      return result;
    }
  }
  return [wordNum];
}