private boolean closeAggregate(final FeedKey feedKey,
                                   final AggregateState aggregateState) {
        LOGGER.debug(() -> LogUtil.message("closeAggregate() - feedKey: {}, {}, waiting for lock",
                feedKey, aggregateState));
        final Lock lock = feedKeyLock.get(feedKey);
        lock.lock();
        try {
            // Now we hold the feedKey lock, re-check the aggregateStateMap
            if (aggregateStateMap.containsKey(feedKey)) {
                LOGGER.debug(() -> LogUtil.message("closeAggregate() - feedKey: {}, {}, acquired lock",
                        feedKey, aggregateState));

                destination.accept(aggregateState.aggregateDir);
                aggregateStateMap.remove(feedKey);
                captureAggregateMetrics(aggregateState);
                LOGGER.debug(() -> LogUtil.message("closeAggregate() - feedKey: {}, {}, closed aggregate",
                        feedKey, aggregateState));
                return true;
            } else {
                LOGGER.debug(() -> LogUtil.message(
                        "closeAggregate() - feedKey: {}, {}, " +
                        "feedKey not in aggregateStateMap, another thread must have closed it.",
                        feedKey, aggregateState));
                return false;
            }
        } finally {
            lock.unlock();
        }
    }
Just get a single part for the entire file group.

@param fileGroup The file group to get the zip item count and total uncompressed size from.
@return A single part to add to teh current aggregate.
@throws IOException Could be throws when reading entries.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/PreAggregator.java