def METHOD_NAME(source, dest, c_hash=None):
    """copies data from the source stream to the destination stream"""
    while True:
        buf = source.read(BUFFER_SIZE)
        if not buf:
            break
        if dest:
            dest.write(buf)
        if c_hash:
            c_hash.update(buf)