public static void storeFileSet(@NotNull DataOutput out,
                                  @NotNull Object fileSetObject) throws IOException {
    // format is either <single id> (positive int value)
    //               or <-ids count> <id_1> <id_2-id_1> <id_3-id_2> ... (i.e. diff-encoded ids)
    if (fileSetObject instanceof Integer) {
      final int singleFileId = (Integer)fileSetObject;
      checkFileIdSanity(singleFileId);
      DataInputOutputUtil.writeINT(out, singleFileId); // most common 90% case during index building
    }
    else {
      // serialize positive file ids with delta encoding
      final ChangeBufferingList originalInput = (ChangeBufferingList)fileSetObject;
      final IntIdsIterator intIterator = originalInput.sortedIntIterator();
      if (IndexDebugProperties.DEBUG) LOG.assertTrue(intIterator.hasAscendingOrder());

      if (intIterator.size() == 1) {
        final int singleFileId = intIterator.next();
        checkFileIdSanity(singleFileId);
        DataInputOutputUtil.writeINT(out, singleFileId);
      }
      else {
        DataInputOutputUtil.writeINT(out, -intIterator.size());

        int prev = 0;
        while (intIterator.hasNext()) {
          int fileId = intIterator.next();
          DataInputOutputUtil.writeINT(out, fileId - prev);
          prev = fileId;
        }
      }
    }
  }
public static void storeFileSet(@NotNull DataOutput out,
                                  @NotNull Object fileSetObject)