Use ZstdSharp

This commit is contained in:
Crsky
2026-02-28 11:16:25 +08:00
parent dc813737b4
commit 7e9da65cf1
4 changed files with 5 additions and 7 deletions

View File

@@ -126,8 +126,8 @@
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="WindowsBase" />
<Reference Include="ZstdNet, Version=1.5.7.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\ZstdNet.1.5.7\lib\netstandard2.0\ZstdNet.dll</HintPath>
<Reference Include="ZstdSharp, Version=0.8.7.0, Culture=neutral, PublicKeyToken=8d151af33a4ad5cf, processorArchitecture=MSIL">
<HintPath>..\packages\ZstdSharp.Port.0.8.7\lib\net462\ZstdSharp.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
@@ -1391,12 +1391,10 @@ exit 0</PreBuildEvent>
<PostBuildEvent>if not exist "$(TargetDir)\GameData" mkdir "$(TargetDir)\GameData"
xcopy "$(ProjectDir)\Resources\*" "$(TargetDir)\GameData\" /D /Y &gt;NUL</PostBuildEvent>
</PropertyGroup>
<Import Project="..\packages\ZstdNet.1.5.7\build\ZstdNet.targets" Condition="Exists('..\packages\ZstdNet.1.5.7\build\ZstdNet.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup>
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\ZstdNet.1.5.7\build\ZstdNet.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\ZstdNet.1.5.7\build\ZstdNet.targets'))" />
<Error Condition="!Exists('..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets'))" />
</Target>
<Import Project="..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets" Condition="Exists('..\packages\System.ValueTuple.4.6.2\build\net471\System.ValueTuple.targets')" />

View File

@@ -313,7 +313,7 @@ namespace GameRes.Formats.NeXAS
static private byte[] ZstdDecompress (Stream s, uint unpackedSize)
{
using (var ds = new ZstdNet.DecompressionStream (s))
using (var ds = new ZstdSharp.DecompressionStream (s))
{
var dst = new byte[unpackedSize];
ds.Read (dst, 0, dst.Length);

View File

@@ -527,7 +527,7 @@ namespace GameRes.Formats.NitroPlus
m_stream = new DeflateStream (m_stream, CompressionMode.Decompress);
break;
case 3:
m_stream = new ZstdNet.DecompressionStream (m_stream);
m_stream = new ZstdSharp.DecompressionStream (m_stream);
break;
}
}

View File

@@ -20,5 +20,5 @@
<package id="System.Security.Principal.Windows" version="5.0.0" targetFramework="net472" />
<package id="System.Threading.Tasks.Extensions" version="4.6.3" targetFramework="net472" />
<package id="System.ValueTuple" version="4.6.2" targetFramework="net472" />
<package id="ZstdNet" version="1.5.7" targetFramework="net472" />
<package id="ZstdSharp.Port" version="0.8.7" targetFramework="net472" />
</packages>