public void Load(BinaryReader reader, Action <int, long> values, int count) { long factor = (long)CountCompression.Deserialize(reader); List <long> rawValues = (List <long>)DeltaCompression.CoreDecompress(reader); for (int i = 0; i < count; i++) { values(i, factor * rawValues[i]); } }
public void Load(BinaryReader reader, Action <int, float> values, int count) { int digits = reader.ReadSByte(); if (digits >= 0) { double koef = Math.Pow(10, digits); List <long> rawValues = (List <long>)DeltaCompression.CoreDecompress(reader); for (int i = 0; i < count; i++) { values(i, (float)Math.Round(rawValues[i] / koef, digits)); } } else //native read { for (int i = 0; i < count; i++) { values(i, reader.ReadSingle()); } } }