Documentation ¶
Overview ¶
Package asm provides the API for streaming assembly and disassembly of tar archives.
Using the `github.com/vbatts/tar-split/tar/storage` for Packing/Unpacking the metadata for a stream, as well as an implementation of Getting/Putting the file entries' payload.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewInputTarStream ¶
NewInputTarStream wraps the Reader stream of a tar archive and provides a Reader stream of the same.
In the middle it will pack the segments and file metadata to storage.Packer `p`.
The the storage.FilePutter is where payload of files in the stream are stashed. If this stashing is not needed, you can provide a nil storage.FilePutter. Since the checksumming is still needed, then a default of NewDiscardFilePutter will be used internally
func NewOutputTarStream ¶
func NewOutputTarStream(fg storage.FileGetter, up storage.Unpacker) io.ReadCloser
NewOutputTarStream returns an io.ReadCloser that is an assembled tar archive stream.
It takes a storage.FileGetter, for mapping the file payloads that are to be read in, and a storage.Unpacker, which has access to the rawbytes and file order metadata. With the combination of these two items, a precise assembled Tar archive is possible.
func WriteOutputTarStream ¶ added in v0.9.11
WriteOutputTarStream writes assembled tar archive to a writer.
Types ¶
This section is empty.