docs: def stream_entry_assemble(hasher, file, eccfile, entry_fields, max_block_size, header_size, resilience_rates, constantmode=False):
      '''From an entry with its parameters (filename, filesize), assemble a list of each block from the original file along with the relative hash and ecc for easy processing later.'''
      # Cut the header and the ecc entry into blocks, and then assemble them so that we can easily process block by block
      eccfile.seek(entry_fields["ecc_field_pos"][0])
      curpos = file.tell()
      ecc_curpos = eccfile.tell()
      while (ecc_curpos < entry_fields["ecc_field_pos"][1]): # continue reading the input file until we reach the position of the previously detected ending marker
          # Compute the current rate, depending on where we are inside the input file (headers? later stage?)
          if curpos < header_size or constantmode: # header stage: constant rate
              rate = resilience_rates[0]
          else: # later stage 2 or 3: progressive rate
              rate = feature_scaling(curpos, header_size, entry_fields["filesize"], resilience_rates[1], resilience_rates[2]) # find the rate for the current stream of data (interpolate between stage 2 and stage 3 rates depending on the cursor position in the file)
          # From the rate, compute the ecc parameters
          ecc_params = compute_ecc_params(max_block_size, rate, hasher)
          # Extract the message block from input file, given the computed ecc parameters
          mes = file.read(ecc_params["message_size"])
          if len(mes) == 0: return # quit if message is empty (reached end-of-file), this is a safeguard if ecc pos ending was miscalculated (we thus only need the starting position to be correct)
          buf = eccfile.read(ecc_params["hash_size"]+ecc_params["ecc_size"])
          hash = buf[:ecc_params["hash_size"]]
          ecc = buf[ecc_params["hash_size"]:]
  
          yield {"message": mes, "hash": hash, "ecc": ecc, "rate": rate, "ecc_params": ecc_params, "curpos": curpos, "ecc_curpos": ecc_curpos}
          # Prepare for the next iteration of the loop
          curpos = file.tell()
          ecc_curpos = eccfile.tell()
      # Just a quick safe guard against ecc ending marker misdetection
      file.seek(0, os.SEEK_END) # alternative way of finding the total size: go to the end of the file
      size = file.tell()
      if curpos < size: print("WARNING: end of ecc track reached but not the end of file! Either the ecc ending marker was misdetected, or either the file hash changed! Some blocks maybe may not have been properly checked!")