Class StringToken
Namespace: ValveResourceFormat.Utils
Assembly: ValveResourceFormat.dll
Provides utilities for string token hashing and inverse lookup.
public static class StringTokenInheritance
Fields
InvertedTable
Gets the inverted table for hash to string lookups.
public static readonly ConcurrentDictionary<uint, string> InvertedTableField Value
ConcurrentDictionary<uint, string>
MURMUR2SEED
seed value.public const uint MURMUR2SEED = 826366246Field Value
VRF_GENERATOR
Generator identification string with version.
public static readonly string VRF_GENERATORField Value
Methods
Get(ReadOnlySpan<char>)
Computes the hash token for the given string. Case insensitive.
public static uint Get(ReadOnlySpan<char> key)Parameters
key ReadOnlySpan<char>
The string to hash.
Returns
The hash token.
GetKnownString(uint)
Gets a known string for the given hash, or returns an unknown key placeholder.
public static string GetKnownString(uint hash)Parameters
hash uint
The hash to look up.
Returns
The known string or a placeholder.
Store(ReadOnlySpan<char>)
Store a string to the table of known string hashes, so it can later be retrieved using .
public static uint Store(ReadOnlySpan<char> key)Parameters
key ReadOnlySpan<char>
Returns
Store(IEnumerable<string>)
Store a number of strings to the table of known string hashes, so they can later be retrieved using .
public static void Store(IEnumerable<string> keys)Parameters
keys IEnumerable<string>

