private long writeStream(final ZipArchiveEntry zipArchiveEntry,
                             final InputStream inputStream) throws IOException {
        final DurationTimer timer = LogUtil.startTimerIfDebugEnabled(LOGGER);
        putArchiveEntry(zipArchiveEntry);
        try {
            final long bytes = TransferUtil.transfer(inputStream, zipArchiveOutputStream, buffer);
            LOGGER.debug(() -> LogUtil.message(
                    "writeStream() - path: {}, zipArchiveEntry: {}, bytes: {}, duration: {}",
                    path,
                    zipArchiveEntry,
                    ByteSize.ofBytes(bytes),
                    timer));
            return bytes;
        } finally {
            closeArchiveEntry();
        }
    }
@return The number of bytes read.
stroom-proxy/stroom-proxy-app/src/main/java/stroom/proxy/app/handler/ZipWriter.java