mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 13:01:52 +00:00
22 lines
387 B
Beef
22 lines
387 B
Beef
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);
|
|
}
|
|
}
|
|
} |