static @NotNull SortIndexMap createFromSortedList(@NotNull List<Integer> list) {
    int[] reverseMap = new int[list.size()];
    for (int i = 0; i < list.size(); i++) {
      reverseMap[list.get(i)] = i;
    }

    IntList compressedMap = CompressedIntList.newInstance(list);
    IntList compressedReverseMap = CompressedIntList.newInstance(reverseMap);
    return new SortIndexMap() {
      @Override
      public int size() {
        return compressedMap.size();
      }

      @Override
      public int getSortedIndex(int usualIndex) {
        return compressedReverseMap.get(usualIndex);
      }

      @Override
      public int getUsualIndex(int sortedIndex) {
        return compressedMap.get(sortedIndex);
      }
    };
  }
static @NotNull SortIndexMap createFromSortedList(@NotNull List<Integer> list)