Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tarball flow #2034

Closed
choffmeister opened this issue Nov 26, 2019 · 4 comments
Closed

Add tarball flow #2034

choffmeister opened this issue Nov 26, 2019 · 4 comments
Labels
Milestone

Comments

@choffmeister
Copy link
Contributor

Short description

In the same way that there already is a flow to generate a ZIP archive it would be nice to have the same for a simple (uncompressed) TAR ball.

Details

I already have some working code taken from one of my personal projects (see https://github.com/choffmeister/alpakka/tree/tarball-flow). The implementation is pretty straight forward. When one does not need compression (which still could be applied afterwards, like .tar -> .tar.gz), it has one big benefit over the ZIP archive stream:

It does not rely on the blocking Java Input/OutputStream API, but instead it directly uses akka.util.ByteString. So it seems to be way more efficient in terms of CPU usage (in some tests of mine I found 50% usage vs 3% CPU usage when comparing uncompressed ZIP stream vs my TAR stream).

Of course this should be integrated into the already existing Archive class. But before I invest more time to make the code fit nicely into the existing code base, I would like to know if such a feature would be merged.

@ennru ennru added the p:file label Nov 26, 2019
@ennru
Copy link
Member

ennru commented Nov 26, 2019

Thank you for suggesting the work from akka/akka-stream-contrib#176 here instead.
I think this would fit nicely in Alpakka. Please go ahead.

@ennru
Copy link
Member

ennru commented Mar 27, 2020

Did you get to start on this? It would be great to get tar support in Alpakka.

@choffmeister
Copy link
Contributor Author

@ennru Sorry, I did completely forgot about this. Took some time to rewrite my code to hopefully fit nicely next to Archive.zip() (see #2241)

@ennru ennru added this to the 2.0.0 milestone Mar 31, 2020
@ennru
Copy link
Member

ennru commented Mar 31, 2020

Creating TAR archives is now supported with #2241.

Reading TAR archives would be great to have...

@ennru ennru closed this as completed Mar 31, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants