Working with Tar Archive

Learn about the .tar file format, providing APIs for handling tar archives, and working with individual entries in the tar archive.

The .tar files

A file with the extension .tar has been created using the Unix-based archival application tar. A file with the extension .tar.gz has been created using tar and then compressed using the GZIP compression algorithm.

System.Formats.Tar assembly

.NET 7 introduces the System.Formats.Tar assembly, which has APIs for reading, writing, archiving, and extracting tar archives. The TarFile class has static public members, as shown in the following table:

Get hands-on with 1400+ tech skills courses.