private synchronized void pack(int max, int delta, String zipPostfix) {
    if (!ENABLED) return;
    try (JBZipFile archive = getTasksArchive(zipPostfix)) {
      List<JBZipEntry> entries = archive.getEntries();
      if (entries.size() > max + delta) {
        JBZipEntry[] array = entries.toArray(new JBZipEntry[0]);
        Arrays.sort(array, ENTRY_COMPARATOR);
        for (int i = array.length - 1; i >= max; i--) {
          archive.eraseEntry(array[i]);
        }
        archive.gc();
      }
    }
    catch (IOException e) {
      LOG.error(e);
    }
  }
private synchronized void pack(int max, int delta, String zipPostfix)