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
MurmurHash2 seed value.
public const uint MURMUR2SEED = 826366246Field Value
VRF_GENERATOR
Generator identification string with version.
public static readonly string VRF_GENERATORField Value
Methods
Get(string)
Computes the hash token for the given string. Case insensitive.
public static uint Get(string key)Parameters
key string
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(string)
Store a string to the table of known string hashes, so it can later be retrieved using .
public static uint Store(string key)Parameters
key string
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>

