-
Notifications
You must be signed in to change notification settings - Fork 30
/
V0Header.cs
26 lines (25 loc) · 959 Bytes
/
V0Header.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using HdrHistogram.Utilities;
namespace HdrHistogram.Encoding
{
internal sealed class V0Header : IHeader
{
public V0Header(int cookie, ByteBuffer buffer)
{
Cookie = cookie;
NumberOfSignificantValueDigits = buffer.GetInt();
LowestTrackableUnitValue = buffer.GetLong();
HighestTrackableValue = buffer.GetLong();
PayloadLengthInBytes = int.MaxValue;
IntegerToDoubleValueConversionRatio = 1.0;
NormalizingIndexOffset = 0;
}
public int Cookie { get; }
public int PayloadLengthInBytes { get; }
public int NormalizingIndexOffset { get; }
public int NumberOfSignificantValueDigits { get; }
public long LowestTrackableUnitValue { get; }
public long HighestTrackableValue { get; }
public double IntegerToDoubleValueConversionRatio { get; }
public int CapacityEstimateExcess => 32;
}
}