public static int aliveEntriesCount(@NotNull BufferSource bufferSource,
                                        int segmentIndex,
                                        int segmentSize) throws IOException {
      if (segmentIndex < 1) {
        throw new IllegalArgumentException("segmentIndex(=" + segmentIndex + ") must be >=1 (0-th segment is a header)");
      }
      long offsetInFile = segmentIndex * (long)segmentSize;
      return bufferSource.getInt(offsetInFile + LIVE_ENTRIES_COUNT_OFFSET);
    }
public static int aliveEntriesCount(@NotNull BufferSource bufferSource,
                                        int segmentIndex,
                                        int segmentSize)