How can I compress data that represents a number's change over time? I have a value that increases by unknown increments at unknown times.  Given a time, I need to check how much it has increased between that time and now.

I could simply store every time/increase pair whenever the value is increased, but this would be too much data to reasonably store.

For example:

DATA:
Value = 0 @ 0:00
Value = 2 @ 0:04
Value = 7 @ 0:05
Value = 52 @ 0:07 (Current time)

RESULT:
1 Second: 52
3 Seconds:  2 + 7 + 52 = 61


I am not sure what I am trying to do is even possible.  But, is there a way I can store the increments such that I can keep the file size reasonably small, and still find a decent approximation of the increase in the value?  It does not need to be exact - a margin of error less than 5% would be acceptable.
In the case of storage and querying from the storage i.e. if you can first get all time:value pairs, you can use curve fitting (regression) to get the polynomial function v=f(t), where v = value and t = time which will not be accurate, may even be outside 5% error margin; but would the  get the work done in a very low file size and acceptable(?) margin of error.