Skip to main content

SerializeHashedObject

A static class in Root.Township, Alta.

Stream extension methods that send a HashedGeneralValue (or a PlayerProgressFlag) as its 16-bit hash.

Methods​

MemberWhat it is
static void SerializeHashed<T>(Stream stream, ref T value)Writes the value's hash in 16 bits (0 for null) and looks it up again on read.
static void SerializeHashedCached<T>(Stream stream, ref T value, ref T last)Sends one bit if the value is the same as last, otherwise the hash, and updates last.
static void SerializeProgressFlag<T>(Stream stream, ref T value)Like SerializeHashed, for progress flags, cast back to the flag type on read.