CompressionMode Struct
HAKOM.TSM.Net.Api.Data.TimeSeries.Compression
Section titled “HAKOM.TSM.Net.Api.Data.TimeSeries.Compression”In HAKOM terminology time series compression is a data storage technology, where individual time series values are cascaded to fixed sized blocks, that are binary encoded and saved to the database. The size of the blocks depends on the interval of the underlying data. The CompressionMode represents the type of compression.
public readonly struct CompressionMode : System.IEquatable<HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode>, HAKOM.TSM.Net.Api.IEnumeration<HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode, int>, HAKOM.TSM.Net.Api.IEnumeration<HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode>Implements System.IEquatable<CompressionMode>, HAKOM.TSM.Net.Api.IEnumeration<CompressionMode,System.Int32>, HAKOM.TSM.Net.Api.IEnumeration<CompressionMode>
Properties
Section titled “Properties”CompressionMode.Value Property
Section titled “CompressionMode.Value Property”The number/id representing the type of compression.
public int Value { get; init; }Implements Value
Property Value
Section titled “Property Value”Methods
Section titled “Methods”CompressionMode.Base64BlockCompression() Method
Section titled “CompressionMode.Base64BlockCompression() Method”Create a new instance of CompressionMode representing a compression based on Base64 encoded blocks. Individual time series values are cascaded to fixed sized blocks that are binary encoded and saved to the database. The size of the blocks depends on the interval of the underlying data. A compressed time series with this mode does not save timestamp information for each value. Instead adjacent value-flag pairs are combined together to a block. This reduces data storage space and the database index size.
public static HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode Base64BlockCompression();Returns
Section titled “Returns”CompressionMode
A new instance of CompressionMode representing that the compression is turned on and based on Base64 encoded blocks.
CompressionMode.Create(int) Method
Section titled “CompressionMode.Create(int) Method”Creates a new instance of CompressionMode with a custom value.
public static HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode Create(int value);Parameters
Section titled “Parameters”value System.Int32
The System.Int32 id of the compression mode.
Returns
Section titled “Returns”CompressionMode
A new instance of CompressionMode.
CompressionMode.Default() Method
Section titled “CompressionMode.Default() Method”Creates a new default instance of CompressionMode. The default instance is no compression.
public static HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode Default();Returns
Section titled “Returns”CompressionMode
A new instance of the default CompressionMode (Value=default).
CompressionMode.Equals(CompressionMode) Method
Section titled “CompressionMode.Equals(CompressionMode) Method”Compares the value of this compression mode to another compression mode returning a boolean.
public bool Equals(HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode other);Parameters
Section titled “Parameters”other CompressionMode
The CompressionMode, which is used for comparison.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the compression modes are equal (true) or not equal(false).
CompressionMode.Equals(object) Method
Section titled “CompressionMode.Equals(object) Method”Compares the value of this compression mode to another compression mode returning a boolean.
public override bool Equals(object? obj);Parameters
Section titled “Parameters”obj System.Object
The CompressionMode, which is used for comparison.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the compression modes are equal (true) or not equal(false).
CompressionMode.GetHashCode() Method
Section titled “CompressionMode.GetHashCode() Method”Creates the hash code for this compression mode, using its value.
public override int GetHashCode();Returns
Section titled “Returns”System.Int32
A hash code for this compression mode.
CompressionMode.NoCompression() Method
Section titled “CompressionMode.NoCompression() Method”Create a new instance of CompressionMode representing that compression is turned off. In case of conventional - uncompressed time series, each data row consists of a timestamp, value and flag.
public static HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode NoCompression();Returns
Section titled “Returns”CompressionMode
a new instance of CompressionMode representing that compression is turned off.
CompressionMode.ToString() Method
Section titled “CompressionMode.ToString() Method”Display the name and numeric value of the CompressionMode as formated string.
public override string ToString();Returns
Section titled “Returns”System.String
The name and numeric value in the following format Name (Value).
Operators
Section titled “Operators”CompressionMode.operator ==(CompressionMode, CompressionMode) Operator
Section titled “CompressionMode.operator ==(CompressionMode, CompressionMode) Operator”Compares the value of two compression modes using the operator ‘==’.
public static bool operator ==(HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode left, HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode right);Parameters
Section titled “Parameters”left CompressionMode
The CompressionMode on the left of the ‘==’ operator.
right CompressionMode
The CompressionMode on the right of the ‘==’ operator.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the compression modes are equal (true) or not equal (false).
CompressionMode.operator !=(CompressionMode, CompressionMode) Operator
Section titled “CompressionMode.operator !=(CompressionMode, CompressionMode) Operator”Compares the value of two compression modes using the operator ‘!=’.
public static bool operator !=(HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode left, HAKOM.TSM.Net.Api.Data.TimeSeries.Compression.CompressionMode right);Parameters
Section titled “Parameters”left CompressionMode
The CompressionMode on the left of the ‘!=’ operator.
right CompressionMode
The CompressionMode on the right of the ‘!=’ operator.
Returns
Section titled “Returns”System.Boolean
A System.Boolean indicating if the values of the compression modes are not equal (true) or equal (false).