Treat 0-byte reads and writes as no-ops to comply with the documented type requirements for SyncReadStream, AsyncReadStream, SyncWriteStream and AsyncWriteStream.