ITypeSerializer

Description

[ShutdownSurvive]
interface Tinman.Core.IO.Serialization.ITypeSerializer<T>

Extended by

ITypeSerializerEx
TypeSerializerBase abstract

Base interface for classes that perform serialization of concrete types.

For serialization of value arrays and collections, a type serializer may provide an optional component-wise delta encoding between subsequent values. Such encoding can improve compression ratios, as it usually reduces the entropy of the data.

Public / Methods

Read​Value


public method ReadValue → (1)

data in : ISerializer

[not-null]
The serialization stream.

returns → T

The deserialized value.

Deserializes a struct value form the given serialization stream.

IOException

If an I/O error has occurred.

Read​Value​Array


public method ReadValueArray → (2)

data in : ISerializer

[not-null]
The serialization stream.

delta opt : bool = false

Use component-wise delta encoding, if supported?

returns → T [ ]

The deserialized value.

Deserializes a struct value array form the given serialization stream.

IOException

If an I/O error has occurred.

Read​Value​Collection


public method ReadValueCollection → (3)

data in : ISerializer

[not-null]
The serialization stream.

values in : IBag<T>

[not-null]
Output for deserialized struct values.

delta opt : bool = false

Use component-wise delta encoding, if supported?

Deserializes a struct value collection from the given serialization stream.

IOException

If an I/O error has occurred.

Write​Value


public method WriteValue → (2)

data in : ISerializer

[not-null]
The serialization stream.

value in : T

The struct value to serialize.

Serializes the given struct value to the serialization stream.

IOException

If an I/O error has occurred.

Write​Value​Array

2 overloads


public method WriteValueArray1 → (3)

data in : ISerializer

[not-null]
The serialization stream.

values in : T [ ]

The struct values to serialize.

delta opt : bool = false

Use component-wise delta encoding, if supported?

Serializes the given struct value array to the serialization stream.

IOException

If an I/O error has occurred.


public method WriteValueArray2 → (5)

data in : ISerializer

[not-null]
The serialization stream.

values in : T [ ]

The struct values to serialize.

first in : int32

[>=0]
Index of first array element to write.

count in : int32

[>=0]
Number array elements to write.

delta opt : bool = false

Use component-wise delta encoding, if supported?

Serializes the given struct value array to the serialization stream.

IOException

If an I/O error has occurred.

Write​Value​Collection


public method WriteValueCollection → (3)

data in : ISerializer

[not-null]
The serialization stream.

values in : IBagConst<T>

The struct values to serialize.

delta opt : bool = false

Use component-wise delta encoding, if supported?

Serializes the given struct value collection to the serialization stream.

IOException

If an I/O error has occurred.