BZIP2の抽出

BZIP2、"バロウズ・ホイーラー・ブロックソートテキストコンプレッサー"は、UnixおよびLinuxシステムで一般的に使用されるファイル圧縮ユーティリティです。 その名前が示すように、個々のテキストファイルの圧縮に適しています。 これらのオペレーティングシステムでは人気のフォーマットですが、解凍に失敗する場合があります。 この原因は、大きなBZIP2ファイルを解凍するには他のフォーマットよりも多くのメモリとCPUリソースが必要だったり、TARファイルのようにネストされたアーカイブをサポートしていない解凍ライブラリによる場合があります。

しかし、IronZIPはこれらすべての形式をサポートしており、互換性の問題を解消します。 また、すべての主要なオペレーティングシステムで動作します。 ここでは、BZIP2ファイルを解凍する方法の簡単な例を示します。

BZIP2アーカイブの解凍

We can easily access the functionalities of the IronZIP namespace in our project. Specifically, the IronBZIP2Archive class includes a method called ExtractArchiveToDirectory, which allows us to extract the contents of a BZIP2 file.

The ExtractArchiveToDirectory method in the IronBZIP2Archive class is designed to unpack the contents of a BZIP2 file into a specified directory. 最初に必要なパラメータはBZIP2ファイルへのフルパスで、2番目のパラメータは宛先フォルダーを示します。 開発者はこのプロセスを効果的かつ安全として頼ることができます。

It is important to note that both the original file extension and the .bz2 extension must be included in the file name. This is because the file extension is removed during the compression process, and the method also removes the .bz2 extension during extraction.

IronZipでZIPファイルの作成、読み込み、解凍を学ぶ

準備はできましたか?
Nuget ダウンロード 17,333 | バージョン: 2025.12 リリース