Tar archive decoding using :erl_tar.
Req.Decode can use this module for .tar, .tgz, .tar.gz, and application/x-tar
responses when the :tar or :tgz decoder is enabled via the :decoders option.
Summary
Functions
Decodes a tar archive binary into a list of {name, contents} entries.
Functions
@spec decode(binary()) :: {:ok, [{charlist(), binary()}]} | {:error, %Req.ArchiveError{ __exception__: term(), data: term(), format: term(), reason: term() }}
Decodes a tar archive binary into a list of {name, contents} entries.
The binary may be a plain tar archive or a gzip-compressed one (.tar.gz/.tgz); the
compression is detected automatically.
Returns {:ok, entries} or {:error, exception}.