compress
Check if we're between 16 before and 15 after one of the pointers, (always starting with the 0th one). If so, bias the delta to be 0..31, shift it left twice, and add the pointer number 0..3 that was used. Also adjust that pointer to the new value. That produces a value in 0..127, which gets written in one byte by the serializer.
Otherwise, replace the least recently used pointer, marking it as most recently used in the ring, and answering the index + 128.
NOTE: This implementation requires inputs to be in the range [0..Int.MAX_VALUE - 128].