private static Task WriteBufferAsync(IByteTarget target, IByteBuffer buffer, CancellationToken cancellationToken) => buffer.CopyToStreamAsync(target.AsWritableStream(), cancellationToken);
private static void WriteBuffer(IByteTarget target, IByteBuffer buffer) => buffer.CopyToStream(target.AsWritableStream());