TAR is a popular UNIX-based archiving format that is used to package multiple files including audios, videos, installers, etc. On the other hand, GNU is a data compression algorithm to compress large files before sharing. The TAR.GZ is the combination of TAR’s archiving and GNU’s compression. Similarly, XZ Utils also provides compression of TAR archives as TAR.XZ format. In this article, you will learn how to compress TAR archives and create TAR.GZ and TAR.XZ files in C#.