Is it possible to create a TarFile object in memory using a buffer containing the tar data without having to write the TarFile to disk and open it up again? We get the bytes
Sure, something like this:
import io io_bytes = io.BytesIO(byte_array) tar = tarfile.open(fileobj=io_bytes, mode='r')
(Adjust mode to fit the format of your tar file, e.g. possibly `mode='r:gz', etc.)
mode