Extract TAR

TAR files are most commonly used for bundling and compressing multiple files and directories into a single archive. However, extracting them could be troublesome at times, as they are used in conjunction with GZIP and BZIP2. However, with the versatility of IronZIP, we can simply call the IronTarArchive class to extract the contents of the TAR for the last layer and then further extract it in the second format, all within a single library.

Extracting ZIP File with C#

  1. using IronZip
  2. IronTarArchive.ExtractArchiveToDirectory("output.tar", "extracted");

Extracting TAR Archive

To begin with, we need to include the IronZip namespace in our project, which provides access to its functionalities. We can then use the IronTarArchive class to extract the contents of the TAR file with the method ExtractArchiveToDirectory.

This function is designed to unpack the contents of a TAR file into a specified directory. The initial parameter should be the full path to the TAR file that you wish to extract. The second parameter indicates the destination folder where the unpacked files will be stored.

Discover How to Create, Read, and Extract ZIP Archives with IronZIP!

Ready to Get Started?
Nuget Downloads 14,507 | Version: 2025.9 just released