code: def _split_file(f, blocksize):
      
  
      f_bytes = f.read()
      blocks = [int.from_bytes(f_bytes[i:i+blocksize].ljust(blocksize, b'0'), sys.byteorder) 
              for i in range(0, len(f_bytes), blocksize)]
      return len(f_bytes), blocks
docs: Block file byte contents into blocksize chunks, padding last one if necessary