public void gc() throws IOException {
    if (myOutputStream != null) {
      myOutputStream = null;

      final Map<JBZipEntry, byte[]> existingEntries = new LinkedHashMap<>();
      for (JBZipEntry entry : entries) {
        existingEntries.put(entry, entry.getData());
      }

      currentCfdOffset = 0;
      nameMap.clear();
      entries.clear();
      for (Map.Entry<JBZipEntry, byte[]> entry : existingEntries.entrySet()) {
        JBZipEntry zipEntry = getOrCreateEntry(entry.getKey().getName());
        zipEntry.setComment(entry.getKey().getComment());
        zipEntry.setExtra(ContainerUtil.filter(entry.getKey().getExtra(), f -> !(f instanceof Zip64ExtraField)));
        zipEntry.setMethod(entry.getKey().getMethod());
        zipEntry.setTime(entry.getKey().getTime());
        zipEntry.setData(entry.getValue());
      }
    }
  }
public void gc()