GlitchyEngineHelper project

This commit is contained in:
Simon Lübeß
2022-04-09 12:33:05 +02:00
parent d47bc37886
commit b94c84d304
8 changed files with 135 additions and 1 deletions
+22
View File
@@ -0,0 +1,22 @@
using System;
using System.Interop;
namespace xxHash
{
struct XXH64_hash : uint64{}
static
{
[LinkName(.C)]
public static extern XXH64_hash XXH64(void* buffer, c_size size, XXH64_hash seed = 0);
}
static class xxHash
{
[Inline]
public static XXH64_hash ComputeHash(StringView string, XXH64_hash seed = 0)
{
return XXH64(string.Ptr, (.)string.Length, seed);
}
}
}