
## TarArchive class

This class represents a tar archive file. Use it to compose, extract, or update tar archives.

The TarArchive type exposes the following members:
## Constructors
| Name | Description |
| :- | :- |
|TarArchive()|Initializes a new instance of the [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) class.|
|TarArchive(source_stream)|Initializes a new instance of the [Archive](/zip/python-net/aspose.zip/archive/) class and composes an entry list can be extracted from the archive.|
|TarArchive(path)|Initializes a new instance of the [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) class and composes an entry list can be extracted from the archive.|
## Properties
| Name | Description |
| :- | :- |
|entries|Gets entries of [TarEntry](/zip/python-net/aspose.zip.tar/tarentry/) type constituting the archive.|
|file_entries|Gets entries of [IArchiveFileEntry](/zip/python-net/aspose.zip/iarchivefileentry/) type constituting the archive.|
|format|Gets the archive format.|
## Methods
| Name | Description |
| :- | :- |
|create_entry(name, source, file_info)|Create a single entry within the archive.|
|create_entry(name, file_info, open_immediately)|Create a single entry within the archive.|
|create_entry(name, path, open_immediately)|Create a single entry within the archive.|
|create_entries(directory, include_root_directory)|Adds to the archive all the files and directories recursively in the directory given.|
|create_entries(source_directory, include_root_directory)|Adds to the archive all the files and directories recursively in the directory given.|
|delete_entry(entry)|Removes the first occurrence of a specific entry from the entry list.|
|delete_entry(entry_index)|  |
|save(output, format)|  |
|save(destination_file_name, format)|  |
|save_gzipped(output, format)|  |
|save_gzipped(path, format)|  |
|save_zstandard(output, format)|  |
|save_zstandard(path, format)|  |
|save_lzipped(output, format)|  |
|save_lzipped(path, format)|  |
|save_lzma_compressed(output, format)|  |
|save_lzma_compressed(path, format)|  |
|save_lz4_compressed(output, format)|  |
|save_lz4_compressed(path, format)|  |
|save_xz_compressed(output, format, settings)|  |
|save_xz_compressed(path, format, settings)|  |
|save_z_compressed(output, format)|  |
|save_z_compressed(path, format)|  |
|from_g_zip(source)|Extracts supplied gzip archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_g_zip(path)|Extracts supplied gzip archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_zstandard(source)|Extracts supplied Zstandard archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_zstandard(path)|Extracts supplied Zstandard archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_l_zip(source)|Extracts supplied lzip archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_l_zip(path)|Extracts supplied lzip archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_lzma(source)|Extracts supplied LZMA archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_lzma(path)|Extracts supplied LZMA archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_lz4(path)|Extracts supplied LZ4 archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_lz4(source)|Extracts supplied LZ4 archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_xz(source)|Extracts supplied xz format archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_xz(path)|Extracts supplied xz format archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_z(source)|Extracts supplied Zstandard archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|from_z(path)|Extracts supplied Zstandard archive and composes [TarArchive](/zip/python-net/aspose.zip.tar/tararchive/) from extracted data.|
|extract_to_directory(destination_directory)|Extracts all the files in the archive to the directory provided.|

### See Also

* namespace [aspose.zip.tar](/zip/python-net/aspose.zip.tar/)
* assembly [Aspose.Zip](/zip/python-net/)

