private static int deltaToInt(long delta) {
    if (delta >= 0 && delta <= MAX_DELTA) return (int)delta;

    if (delta < 0 && -delta <= MAX_DELTA) return (int)delta;

    return BROKEN_DELTA;
  }
private static int deltaToInt(long delta)