Fix zstd not loaded

This commit is contained in:
2025-10-14 13:56:57 +08:00
parent a21672e7e9
commit 419941b96e
8 changed files with 57 additions and 5 deletions

View File

@@ -9,13 +9,13 @@ namespace GameRes.Compression
{
private const int BUFFER_SIZE = 4096;
[DllImport("zstd.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport("zstd-1.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern IntPtr ZSTD_createDStream();
[DllImport("zstd.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport("zstd-1.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern int ZSTD_decompressStream(IntPtr zds, ref ZSTD_outBuffer output, ref ZSTD_inBuffer input);
[DllImport("zstd.dll", CallingConvention = CallingConvention.Cdecl)]
[DllImport("zstd-1.dll", CallingConvention = CallingConvention.Cdecl)]
private static extern int ZSTD_freeDStream(IntPtr zds);
[StructLayout(LayoutKind.Sequential)]