Data Compression Algorithm


EnOS Storage Policy supports storing time series data after compression. Supported data compression algorithm is Dead Band Compression and Swinging Door Compression. This article describes how the compression algorithm works.

Dead Band Compression

The follow sample shows how the Dead Band Compression algorithm works.

../_images/compression_algorithm_1.png


The algorithm details are as follows:

  1. Assume that data point 1 has been saved.

  2. When data point 2 arrives, compare the values of data point 2 and data point 1. If the value deviation is less than the specified deviation range, discard data point 2.

  3. When data point 3 arrives, compare the values of data point 3 and data point 1. If the value deviation is more than the specified deviation range, save data point 3.

  4. Use data point 3 as the last saved point. When data point 4 arrives, compare the values of data point 4 and data point 3. If the value deviation is less than the specified deviation range, discard data point 4.

Swinging Door Compression

The follow sample shows how the Swinging Door Compression algorithm works.

../_images/compression_algorithm.png


The algorithm details are as follows:

  1. Assume that data point 1 has been saved.

  2. When data point 2 arrives, it will be pending until data point 3 arrives.

  3. When data point 3 arrives, virtual boundaries are formed between data point 3 and data point 1 with the specified deviation range (△y). Judge whether the value of data point 2 is within the boundaries. If yes, discard data point 2.

  4. When data point 4 arrives, virtual boundaries are formed between data point 4 and data point 1 with the specified deviation range (△y). Judge whether the value of data point 3 is within the boundaries. If yes, discard data point 3.

  5. When data point 5 arrives, virtual boundaries are formed between data point 5 and data point 1 with the specified deviation range (△y). Judge whether the value of data point 4 is within the boundaries. If no, save data point 4.

  6. Use data point 4 as the last saved point. Virtual boundaries are formed between the upcoming data point and data point 4 with the specified deviation range (△y). Judge whether data point 5 is discarded or saved.