Table of Contents

Class DefaultCompressor<T>

Namespace
Balsam.Compression
Assembly
Balsam.Backtester.dll

Provides default compression for ISeries using the Last compression opeator.

public class DefaultCompressor<T> : ICompressor

Type Parameters

T
Provides default compression for ISeries using the Last compression opeator.
Inheritance
DefaultCompressor<T>
Implements
Derived
Inherited Members
Extension Methods

Fields

_last

The last value added to the compressor.

protected T _last

Field Value

T

Properties

Count

Gets the number of values added to the compressor.

public int Count { get; }

Property Value

int

FirstDate

Gets the first date added to the compressor.

public DateTime FirstDate { get; }

Property Value

DateTime

LastDate

Gets the last date added to the compressor.

public DateTime LastDate { get; }

Property Value

DateTime

Methods

Add(DateTime, T)

Adds the specified date and value.

public void Add(DateTime date, T value)

Parameters

date DateTime
value T

GetValue()

Gets the compressed value.

public object GetValue()

Returns

object

OnAdd(DateTime, T)

Adds the specified date value pair to the compresssed object.

protected virtual void OnAdd(DateTime date, T value)

Parameters

date DateTime
value T

OnGetValue()

Gets the compressed value.

protected virtual T OnGetValue()

Returns

T

Reset()

Resets the compressor back to its initial state.

public void Reset()