Bug 245748 - New port: archivers/tar-stream-chunker streams stdin of unknown size as a tar to stdout
Summary: New port: archivers/tar-stream-chunker streams stdin of unknown size as a tar...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-19 21:33 UTC by Igor Ostapenko
Modified: 2020-04-19 21:33 UTC (History)
0 users

See Also:


Attachments
tar-stream-chunker.diff (2.99 KB, patch)
2020-04-19 21:33 UTC, Igor Ostapenko
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Ostapenko 2020-04-19 21:33:26 UTC
Created attachment 213578 [details]
tar-stream-chunker.diff

Splits stdin of unknown size onto chunks of given size and collects such chunk
files as a TAR archive what is written to stdout.

Initial motivation was to use it as a packer of a data stream what pipes it to
https://tarsnap.com for backup purposes, with a requirement of low and more
predictable memory consumption. And the problem solved here is that TAR file
header should specify size of a file, but it's unknown due to the nature of
input data stream.

The following real case could be an example:
$ pg_dump ... | tar_stream_chunker ... | tarsnap -c ... @-