Add "cli callback" for streaming output #8
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add
-c cmd [cmd_arg ...] ;
option which, for each extracted file will spawn supplied program, supply decompressed file to its stdin and save its stdout instead of original file.Add
-j n
option, for specifing count of concurent instances of spawned callbacksIt allows for downloading, unziping and processing files without storing originals on disk
For example:
curl "https://dd.b.pvp.net/latest/set1-lite-en_us.zip" | sunzip -j 4 -c cwebp -quiet -m 5 -o - -- - \;
sunzip -c md5sum - \; -j 2 < archive.zip
(very likely useless, but nice for testing)Problems with this patch:
bye()
implementationI done this for fun and don't have any particular use case for this (actually, I had, but this was another useless project done for fun), thus i don't have much motivation for polishing this, but I can try if you would be willing to merge this