Extract BZIP2
BZIP2, short for 'Burrows-Wheeler Block Sort Text Compressor,' is a file compression utility commonly used in Unix and Linux systems. As the name suggests, it is best suited for compressing individual text files.
To extract files from a BZIP2 archive, use the static ExtractArchiveToDirectory
method from the IronBZip2Archive class. This method requires the BZIP2 file path as the first parameter and the extraction directory as the second parameter. It's worth noting that both the file extension and the .bz2 extension are included in the file name. This is because, during compression, the file extension is removed, and during extraction, the method removes the .bz2 extension.