def file_to_id(outfile: str) -> str:
  fn = outfile.split('.')[0]
  assert(fn.startswith('blk'))
  return fn[3:]

def id_int_to_outfile(fid_int: int, fid_len: int) -> str:
  fid_s = str(fid_int)
  prefix = (fid_len - len(fid_s)) * '0'
  return f'blk{prefix+fid_s}.out'

def id_int_to_chunk_id(cid_int: int) -> str:
  cid_s = str(cid_int)
  return cid_s
