anchor.diff:      HighFirstOffset = get_data_point_offset(Higher, LowerStart, HighInterval),
   
       HigherSeconds = Higher#archive_header.seconds,
  -    HigherPoints = LowerSeconds div HigherSeconds,
  -    HigherSize = HigherPoints * ?POINT_SIZE,
  +    HigherPointsPerLower = LowerSeconds div HigherSeconds,
  +    HigherSize = HigherPointsPerLower * ?POINT_SIZE,
       RelativeFirstOffset = HighFirstOffset - HighOffset,
       RelativeLastOffset = mod(RelativeFirstOffset + HigherSize, Higher#archive_header.size),
       HigherLastOffset = RelativeLastOffset + HighOffset,
  
positive.code:     read_point(IO).
  
  
  mod(A, B) when A < 0 -> erlang:abs(A) rem B;
  mod(A, B) -> A rem B.
  
  
  get_data_point_offset(Archive, _Interval, 0) ->
      Archive#archive_header.offset;
  get_data_point_offset(Archive, Interval, BaseInterval) ->
      Distance = Interval - BaseInterval,
      PointDistance = Distance div Archive#archive_header.seconds,
      ByteDistance = PointDistance * ?POINT_SIZE,
  
negative.code: write_propagated_values(IO, Header, Lower, LowerInterval, Values, NumPoints) ->
      AggType = Header#metadata.aggregation,
      XFF = Header#metadata.xff,
      NumValues = length(Values),
      KnownPercentage = NumValues / NumPoints,
      if
          % we do have enough data points to calculate an aggregation
          KnownPercentage >= XFF ->
              AggValue = aggregate(AggType, Values, NumValues, NumPoints),
              lager:info("calculated aggregate [~p] ~p [values ~p]", [AggType, AggValue, Values]),
              Point = data_point(LowerInterval, AggValue),
              {BaseInterval, _} = point_at(IO, Lower#archive_header.offset),
              Offset = get_data_point_offset(Lower, LowerInterval, BaseInterval),
              ok = write_at(IO, Point, Offset),
              true;
          true ->
              false
      end.
  
  
  aggregate(average, Values, NumValues, _) -> lists:sum(Values) / NumValues;
  aggregate(sum, Values, _, _) -> lists:sum(Values);
  aggregate(last, Values, _, _) -> lists:last(Values);
  aggregate(max, Values, _, _) -> lists:max(Values);
  aggregate(min, Values, _, _) -> lists:min(Values);
  aggregate(average_zero, Values, _, NumPoints) -> lists:sum(Values) / NumPoints.
  
  
  write_point(IO, Header, Value, TimeStamp) ->
  