Table of Contents

Class Encoder

Namespace
DeltaPack
Assembly
DeltaPack.dll
public class Encoder
Inheritance
Encoder
Inherited Members

Constructors

Encoder()

public Encoder()

Methods

PushArrayDiff<T>(IList<T>, IList<T>, Func<T, T, bool>, Action<T>, Action<T, T>)

public void PushArrayDiff<T>(IList<T> a, IList<T> b, Func<T, T, bool> equals, Action<T> encode, Action<T, T> encodeDiff)

Parameters

a IList<T>
b IList<T>
equals Func<T, T, bool>
encode Action<T>
encodeDiff Action<T, T>

Type Parameters

T

PushArray<T>(IList<T>, Action<T>)

public void PushArray<T>(IList<T> val, Action<T> innerWrite)

Parameters

val IList<T>
innerWrite Action<T>

Type Parameters

T

PushBoolean(bool)

public void PushBoolean(bool val)

Parameters

val bool

PushBooleanDiff(bool, bool)

public void PushBooleanDiff(bool a, bool b)

Parameters

a bool
b bool

PushBoundedInt(long, long)

public void PushBoundedInt(long val, long min)

Parameters

val long
min long

PushBoundedIntDiff(long, long, long)

public void PushBoundedIntDiff(long a, long b, long min)

Parameters

a long
b long
min long

PushEnum(int, int)

public void PushEnum(int val, int numBits)

Parameters

val int
numBits int

PushEnumDiff(int, int, int)

public void PushEnumDiff(int a, int b, int numBits)

Parameters

a int
b int
numBits int

PushFieldDiff<T>(T, T, Func<T, T, bool>, Action<T, T>)

public void PushFieldDiff<T>(T a, T b, Func<T, T, bool> equals, Action<T, T> encodeDiff)

Parameters

a T
b T
equals Func<T, T, bool>
encodeDiff Action<T, T>

Type Parameters

T

PushFloat(float)

public void PushFloat(float val)

Parameters

val float

PushFloatDiff(float, float)

public void PushFloatDiff(float a, float b)

Parameters

a float
b float

PushFloatQuantized(float, float)

public void PushFloatQuantized(float val, float precision)

Parameters

val float
precision float

PushFloatQuantizedDiff(float, float, float)

public void PushFloatQuantizedDiff(float a, float b, float precision)

Parameters

a float
b float
precision float

PushInt(long)

public void PushInt(long val)

Parameters

val long

PushIntDiff(long, long)

public void PushIntDiff(long a, long b)

Parameters

a long
b long

PushObjectDiff<T>(T, T, Func<T, T, bool>, Action)

public void PushObjectDiff<T>(T a, T b, Func<T, T, bool> equals, Action encodeDiff)

Parameters

a T
b T
equals Func<T, T, bool>
encodeDiff Action

Type Parameters

T

PushOptionalDiff<T>(T?, T?, Action<T>, Action<T, T>)

public void PushOptionalDiff<T>(T? a, T? b, Action<T> encode, Action<T, T> encodeDiff) where T : struct

Parameters

a T?
b T?
encode Action<T>
encodeDiff Action<T, T>

Type Parameters

T

PushOptionalDiff<T>(T?, T?, Action<T>, Action<T, T>)

public void PushOptionalDiff<T>(T? a, T? b, Action<T> encode, Action<T, T> encodeDiff) where T : class

Parameters

a T
b T
encode Action<T>
encodeDiff Action<T, T>

Type Parameters

T

PushOptional<T>(T?, Action<T>)

public void PushOptional<T>(T? val, Action<T> innerWrite) where T : class

Parameters

val T
innerWrite Action<T>

Type Parameters

T

PushRecordDiff<TKey, TValue>(IDictionary<TKey, TValue>, IDictionary<TKey, TValue>, Func<TValue, TValue, bool>, Action<TKey>, Action<TValue>, Action<TValue, TValue>)

public void PushRecordDiff<TKey, TValue>(IDictionary<TKey, TValue> a, IDictionary<TKey, TValue> b, Func<TValue, TValue, bool> valueEquals, Action<TKey> encodeKey, Action<TValue> encodeVal, Action<TValue, TValue> encodeDiff) where TKey : notnull

Parameters

a IDictionary<TKey, TValue>
b IDictionary<TKey, TValue>
valueEquals Func<TValue, TValue, bool>
encodeKey Action<TKey>
encodeVal Action<TValue>
encodeDiff Action<TValue, TValue>

Type Parameters

TKey
TValue

PushRecord<TKey, TValue>(IDictionary<TKey, TValue>, Action<TKey>, Action<TValue>)

public void PushRecord<TKey, TValue>(IDictionary<TKey, TValue> val, Action<TKey> innerKeyWrite, Action<TValue> innerValWrite) where TKey : notnull

Parameters

val IDictionary<TKey, TValue>
innerKeyWrite Action<TKey>
innerValWrite Action<TValue>

Type Parameters

TKey
TValue

PushString(string)

public void PushString(string val)

Parameters

val string

PushStringDiff(string, string)

public void PushStringDiff(string a, string b)

Parameters

a string
b string

PushUInt(ulong)

public void PushUInt(ulong val)

Parameters

val ulong

ToBuffer()

public byte[] ToBuffer()

Returns

byte[]