tarConverter top-level constant

Converter<SynchronousTarEntry, List<int>> const tarConverter

A synchronous encoder for in-memory tar files.

The default tarWriter creates an asynchronous conversion from a stream of tar entries to a byte stream. When all tar entries are in-memory (SynchronousTarEntry), it is possible to write them synchronously too.

To create a tar archive consisting of a single entry, use Converter.convert on this tarConverter. To create a tar archive consisting of any number of entries, first call Converter.startChunkedConversion with a suitable output sink. Next, call Sink.add for each tar entry and finish the archive by calling Sink.close.

To change the output format of the tar converter, use tarConverterWith. To encode any kind of tar entries, use the asynchronous tarWriter.

Implementation

const Converter<SynchronousTarEntry, List<int>> tarConverter =
    _SynchronousTarConverter(OutputFormat.pax);