I have a packetized binary data file that can be referenced in one of two ways:
- By an arbitrary time tick counter, and
- By a file offset in bytes.
In my example file, I have the following packet locations:
ticks file offset 729047097 3214 <-- Location of first packet 739047132 37492760 <-- Location of last packet --------- -------- 10000035 37494046 <-- Differences
I need a function that I can present start and end ticks, start and end offsets, and a candidate number of ticks between the start and end ticks, and have it return the corresponding file offset.
I already know that I can compute a Bytes per Tick value, and then multiply that by (candidate ticks minus start ticks), but what I would like to know is:
- What is the general form of this function, and
- Is there a name for this general form?