I am trying to unzip a .bz2 file. I don't want to use external unzipping libraries or third party nuget packages. Is there as way to unzip using only c# core libraries ?
Asked
Active
Viewed 29 times
0
-
1You have to use external libraries. Or write one yourself. Perhaps a better question is *why* don't you want to use NuGet packages? .NET Core uses NuGet packages for *everything*. Even when you think you aren't using NuGet, you *are* restoring the NuGet packages needed by the project type you want – Panagiotis Kanavos Jul 29 '20 at 08:02
-
1Strictly speaking, you can use just the core libraries by reimplementing BZ2 yourself. But no, there isn't BZ2 support out-of-the-box. I'd strongly encourage you to accept that using NuGet packages is increasingly a fact of life in the .NET ecosystem. There are definitely cases where I can understand wanting to avoid them (e.g. if you're writing your own NuGet package and want to avoid unnecessary dependencies for the sake of your users, e.g. to avoid diamond dependency issues) but you should have a really strong reason to avoid them. – Jon Skeet Jul 29 '20 at 08:04
-
[Not all compression algorithms, in fact quite few](https://learn.microsoft.com/en-us/dotnet/api/system.io.compression?view=netcore-3.1) (Brotli, Deflate, GZip, Zip) are built into the standard library, so you'll have to include a third-party library that does include what you want. Or reinvent the wheel and include the algorithm in your source, but what use will that be? – CodeCaster Jul 29 '20 at 08:04