Skip to content

Conversation

@Technici4n
Copy link
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

  • Publish PR to GitHub Packages

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant