def stream_file(path, chunksize):
    """Get iterator over a file's contents.

  :param path: Path to file.
  :param chunksize: Bytes per chunk.

  """
    with open(path, 'rb') as reader:
        while True:
            chunk = reader.read(chunksize)
            if chunk:
                yield chunk
            else:
                break
