我试图通过使用 ICSharpCode.SharpZipLib 的代码解压缩 bz2 文件。
似乎无论我在哪里制作文件,即使我可以完全访问它,我仍然会收到此异常。非常感谢任何帮助。
using System;
using System.IO;
using ICSharpCode.SharpZipLib.BZip2;
namespace decompressor
{
class MainClass
{
public static void Main(string[] args)
{
string filePath = "C:\\FreeBase\\opinions.tsv.bz2";
string decompressPath = "C:\\Users\\mike\\Desktop\\Decompressed";
Console.WriteLine("Decompressing {0} to {1}", file, path);
BZip2.Decompress(File.OpenRead(filePath),File.OpenWrite(decompressPath), true);
}
}
}