def delta_chunk_apply(dc, bbuf, write):
    """Apply own data to the target buffer
    :param bbuf: buffer providing source bytes for copy operations
    :param write: write method to call with data to write"""
    if dc.data is None:
        write(bbuf[dc.so:dc.so + dc.ts])
    elif dc.ts < len(dc.data):
        write(dc.data[:dc.ts])
    else:
        write(dc.data)
