code: def encoder(f, blocksize, seed=None, c=sampler.DEFAULT_C, delta=sampler.DEFAULT_DELTA):
      
  
      # Generate seed if not provided
      if seed is None:
          seed = randint(0, 1 << 31 - 1)
  
      # get file blocks
      filesize, blocks = _split_file(f, blocksize)
  
      # init stream vars
      K = len(blocks)
      prng = sampler.PRNG(params=(K, delta, c))
      prng.set_seed(seed)
  
      # block generation loop
      while True:
          blockseed, d, ix_samples = prng.get_src_blocks()
          block_data = 0
          for ix in ix_samples:
              block_data ^= blocks[ix]
  
          # Generate blocks of XORed data in network byte order
          block = (filesize, blocksize, blockseed, int.to_bytes(block_data, blocksize, sys.byteorder))
          yield pack('!III%ss'%blocksize, *block)
docs: Generates an infinite sequence of blocks to transmit
      to the receiver