sclass Zip2Zip_Zip4j is AutoCloseable { // must set File inZip; new Set filesWritten; // optional IPred predicate; // internal Zip4j_MergeZipFilesWithFilter zip4j; close { dispose zip4j; } *(File outZip) ctex { zip4j = new Zip4j_MergeZipFilesWithFilter(outZip); } run { zip4j.addZipFile(inZip, fileName -> { if (predicate != null && !predicate.get(fileName)) false; ret filesWritten.add(fileName); }); } void finish() ctex { zip4j.finish(); } }