Frame of Reference
Frame of Reference (FOR) encoding subtracts a baseline value (usually the minimum) from every element of a sequence, shrinking all values to benefit subsequent variable-length coding.
Purpose
It compresses integer sequences whose values are large in absolute terms but span a narrow range (e.g., incrementing IDs and timestamps).
Mechanism
Record the sequence minimum as the frame baseline and encode each element as x[i] - min; the deltas are then further compressed with Varint/BP128. Decoding adds the baseline back.
Use cases
- Integer column compression in columnar storage
- Document IDs in inverted indexes
- Timestamp sequences