private static ZipEntryGroup.Entry addMetaEntry(final ZipFile zip,
                                                    final ProxyZipWriter zipWriter,
                                                    final ZipEntryGroup.Entry entry,
                                                    final String baseNameOut,
                                                    final StroomZipFileType stroomZipFileType,
                                                    final AttributeMap globalAttributeMap) throws IOException {
        final AttributeMap entryAttributeMap = AttributeMapUtil.cloneAllowable(globalAttributeMap);
        if (entry != null) {
            final ZipArchiveEntry zipEntry = zip.getEntry(entry.getName());
            final InputStream inputStream = zip.getInputStream(zipEntry);
            AttributeMapUtil.read(inputStream, entryAttributeMap);
        }

        final byte[] bytes = AttributeMapUtil.toByteArray(entryAttributeMap);
        final String outEntryName = baseNameOut + stroomZipFileType.getDotExtension();
        zipWriter.writeStream(outEntryName, new ByteArrayInputStream(bytes));
        return new Entry(outEntryName, bytes.length);
    }
Pkg private to ease testing. splitDirConsumer also there to aid testing.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/ZipSplitter.java