Skip to content

[POC] Use Apache Commons Compress for faster zip transfers#81

Draft
Technici4n wants to merge 3 commits into
mainfrom
fast-zip
Draft

[POC] Use Apache Commons Compress for faster zip transfers#81
Technici4n wants to merge 3 commits into
mainfrom
fast-zip

Conversation

@Technici4n
Copy link
Copy Markdown
Member

Unfortunately, the Java stdlib does not offer a way to copy entries from one zip to another without deflating and reinflating them. But with Apache Commons Compress, we can use destinationStream.addRawArchiveEntry(entry, jar.getRawInputStream(entry)); which avoids the decompression+recompression round-trip.

This is a quick proof of concept, on the two strip tasks.

Before:

 DONE  Completed stripServer in 1.66s
 DONE  Completed stripClient in 2.81s

After:

 DONE  Completed stripServer in 0.87s
 DONE  Completed stripClient in 1.09s

@neoforged-pr-publishing
Copy link
Copy Markdown

  • Publish PR to GitHub Packages

@neoforged-automation
Copy link
Copy Markdown

@Technici4n, this pull request has conflicts, please resolve them for this PR to move forward.

@neoforged-automation neoforged-automation Bot added the needs rebase This Pull Request needs to be rebased before being merged label Dec 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs rebase This Pull Request needs to be rebased before being merged

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant