SerializerFlags

Description

[Flags]
enum Tinman.Core.IO.Serialization.SerializerFlags

Flags for controlling the binary layout that used by ISerializer objects.

The documentation of the individual flags describes how the binary layout changes for the methods that write values. Although not mentioned explicitly, the same changes apply to the corresponding read methods.

Public / Constants

None

public constant None → (0:int32)

No serializer flags.

UseVarIntForLength

public constant UseVarIntForLength → (1:int32)

Use IByteWriter.WriteVarInt32 when writing length values with ISerializer.WriteLength, instead of IBinaryWriter.WriteInt32?

UseUnsignedLength

public constant UseUnsignedLength → (2:int32)

If UseVarIntForLength is present, use IByteWriter.WriteVarUInt32 instead of IByteWriter.WriteVarInt32, when writing length values with ISerializer.WriteLength?

UseUtf8ForString

public constant UseUtf8ForString → (4:int32)

Shall the ISerializer.WriteString method write a length-prefixed sequence of UTF-8 code units, instead of a length-prefixed sequence of UTF-16 code units (or ISO-8859-1 code units, if possible)?

UsePlainObjectGuids

public constant UsePlainObjectGuids → (8:int32)

Shall the ISerializer.WriteObject method emit GUID values in plain text form (36 bytes), instead of GUID.First and GUID.Second (16 bytes).

UseVarIntForValues

public constant UseVarIntForValues → (16:int32)

UseUnsignedValues

public constant UseUnsignedValues → (32:int32)

If UseVarIntForValues is present, use IByteWriter.WriteVarUInt32 and IByteWriter.WriteVarUInt64 instead of their signed counterparts, when writing integral values?

UseNoShortcutCode

public constant UseNoShortcutCode → (64:int32)

If UseNoShortcutCode is present, the IByteReader.ReadVarInt64, IByteReader.ReadVarUInt64, IByteWriter.WriteVarInt64 and IByteWriter.WriteVarUInt64 methods do not use shortcut coding (which yields between 1 and 10 bytes). Otherwise, they do (which yields between 1 and 9 bytes).

All

public constant All → (127:int32)

All serializer flags.