private static long cloneAndUpdateMetaEntry(final AttributeMap attributeMap,
                                                final FeedKeyInterner feedKeyInterner,
                                                final ZipFile stagingZip,
                                                final ZipArchiveEntry entry,
                                                final ZipWriter zipWriter,
                                                final Map<String, ZipEntryGroup> baseNameToGroupMap,
                                                final String entryName,
                                                final String baseName) throws IOException {
        final long size;
        final AttributeMap entryAttributeMap = mergeAttributeMaps(stagingZip, entry, attributeMap);

        // Intern the feedKey to save on mem use.
        final FeedKey feedKey = feedKeyInterner.intern(
                entryAttributeMap.get(StandardHeaderArguments.FEED),
                entryAttributeMap.get(StandardHeaderArguments.TYPE));

        final byte[] bytes = AttributeMapUtil.toByteArray(entryAttributeMap);
        zipWriter.writeStream(entryName, new ByteArrayInputStream(bytes));

        final ZipEntryGroup zipEntryGroup = baseNameToGroupMap
                .computeIfAbsent(baseName, k -> new ZipEntryGroup(feedKey));
        // Ensure we override the feed and type names with the meta.
        zipEntryGroup.setFeedKey(feedKey);

        if (zipEntryGroup.getMetaEntry() != null) {
            throw new RuntimeException("Duplicate meta found: " + entryName);
        }
        size = bytes.length;
        zipEntryGroup.setMetaEntry(new Entry(entryName, size));
        return size;
    }
@return The uncompressed size of the entry
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/ZipReceiver.java