Class StringToken
Namespace: ValveResourceFormat.Utils
Assembly: ValveResourceFormat.dll
Provides utilities for string token hashing and inverse lookup.
csharp
public static class StringTokenInheritance
Fields
InvertedTable
Gets the inverted table for hash to string lookups.
csharp
public static readonly ConcurrentDictionary<uint, string> InvertedTableField Value
ConcurrentDictionary<uint, string>
MURMUR2SEED
MurmurHash2 seed value.
csharp
public const uint MURMUR2SEED = 826366246Field Value
VRF_GENERATOR
Generator identification string with version.
csharp
public static readonly string VRF_GENERATORField Value
Methods
Get(string)
Computes the hash token for the given string.
csharp
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.
csharp
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 .
csharp
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 .
csharp
public static void Store(IEnumerable<string> keys)Parameters
keys IEnumerable<string>

