FileStream was recently overhauled, including using an IValueTaskSource as part of its support for async operations. PipeStream used an almost exact copy of the code FileStream had previously been using; we should similarly update PipeStream to use an IValueTaskSource implementation, either the exact same one, sharing the code, or something similar in spirit. This will help to reduce allocations with PipeStream.