message: fix neg slope calculated value
diff: @@ -121,9 +121,13 @@ fn diff(val1: u64, val2: u64) -> f64 {
  }
  #[inline]
  -pub(crate) fn get_calculated_value(first_val: u64, pos: u64, slope: f32) -> u64 {
  +fn get_calculated_value(first_val: u64, pos: u64, slope: f32) -> u64 {
  + if slope < 0.0 {
  + first_val - (pos as f32 * -slope) as u64
  + } else {
  first_val + (pos as f32 * slope) as u64
  }
  +}
  impl FastFieldCodecSerializer for LinearInterpolFastFieldSerializer {
  const NAME: &'static str = "LinearInterpol";
  @@ -261,6 +265,26 @@ mod tests {
  >(data, name)
  }
  + #[test]
  + fn get_calculated_value_test() {
  + // pos slope
  + assert_eq!(get_calculated_value(100, 10, 5.0), 150);
  +
  + // neg slope
  + assert_eq!(get_calculated_value(100, 10, -5.0), 50);
  +
  + // pos slope, very high values
  + assert_eq!(
  + get_calculated_value(i64::MAX as u64, 10, 5.0),
  + i64::MAX as u64 + 50
  + );
  + // neg slope, very high values
  + assert_eq!(
  + get_calculated_value(i64::MAX as u64, 10, -5.0),
  + i64::MAX as u64 - 50
  + );
  + }
  +
  #[test]
  fn test_compression() {
  let data = (10..=6_000_u64).collect::<Vec<_>>();
  