提取焦油
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.
使用 C# 提取 TAR 文件
- 使用 IronZip;
IronTarArchive.ExtractArchiveToDirectory("output.tar", "extracted");
提取 TAR 壓縮包
首先,我們需要在專案中包含IronZip命名空間,以便存取其功能。 We can then use the IronTarArchive class to extract the contents of the TAR file with the method ExtractArchiveToDirectory.
此函數旨在將 TAR 檔案的內容解壓縮到指定的目錄中。 初始參數應該是要提取的 TAR 檔案的完整路徑。 第二個參數指示解壓縮後的檔案將儲存在哪個目標資料夾中。




