Unzip bzip2 files

Closes #1.
This commit is contained in:
Michael Hinrichs 2025-01-08 13:09:46 -06:00
parent e2c292443c
commit 6ac2fc54b2
2 changed files with 6 additions and 1 deletions

View File

@ -6,4 +6,8 @@
<RootNamespace>Generation_Streets_Extractor</RootNamespace>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="SharpZipLib" Version="1.4.2" />
</ItemGroup>
</Project>

View File

@ -1,4 +1,5 @@
//Written for Generation Streets. https://store.steampowered.com/app/887970
using ICSharpCode.SharpZipLib.BZip2;
using System.IO;
using System.IO.Compression;
@ -43,7 +44,7 @@ namespace Generation_Streets_Extractor
}
else if (sub.isCompressed == 2)
{
bw.Write(br.ReadBytes(sub.sizeCompressed));
BZip2.Decompress(new MemoryStream(br.ReadBytes(sub.sizeCompressed)), bw.BaseStream, true);
bw.Close();
n++;
continue;