  
  import cereal.messaging as messaging
  from cereal.services import service_list
  from cereal.visionipc.visionipc_pyx import VisionIpcServer, VisionStreamType  # pylint: disable=no-name-in-module, import-error
  from common.params import Params
  from common.realtime import Ratekeeper, DT_MDL, DT_DMON, sec_since_boot
  from common.transformations.camera import eon_f_frame_size, eon_d_frame_size, tici_f_frame_size, tici_d_frame_size
 
</s> remove   lr = LogReader(os.path.join(rpath, 'rlog2'))
 </s> add   # compress raw rlog before uploading
  with open(os.path.join(rpath, "rlog"), "rb") as f:
    data = bz2.compress(f.read())
  with open(os.path.join(rpath, "rlog.bz2"), "wb") as f:
    f.write(data)
  os.remove(os.path.join(rpath, "rlog"))

  lr = LogReader(os.path.join(rpath, 'rlog.bz2')) </s> remove     lr = LogReader(f"cd:/{route.replace('|', '/')}/{sidx}/rlog")
 </s> add     lr = LogReader(f"cd:/{route.replace('|', '/')}/{sidx}/rlog.bz2") </s> remove     ensure_running(managed_processes.values(), started=True, not_run=ignore)
 </s> add     ensure_running(managed_processes.values(), started=True, params=Params(), CP=car.CarParams(), not_run=ignore)
from cereal import car
  
  import cereal.messaging as messaging
from cereal import car
  from cereal.services import service_list
  from cereal.visionipc.visionipc_pyx import VisionIpcServer, VisionStreamType  # pylint: disable=no-name-in-module, import-error
  from common.params import Params
  from common.realtime import Ratekeeper, DT_MDL, DT_DMON, sec_since_boot
  from common.transformations.camera import eon_f_frame_size, eon_d_frame_size, tici_f_frame_size, tici_d_frame_size
keep add keep keep keep keep keep
 Fix process replay regen (#24517)

* fix regen issues

* compress like uploader 
selfdrive/test/process_replay/regen.py