{"id":13458071,"url":"https://github.com/dotnet/Nerdbank.Streams","last_synced_at":"2025-03-24T14:33:05.462Z","repository":{"id":37270976,"uuid":"43795655","full_name":"dotnet/Nerdbank.Streams","owner":"dotnet","description":"Specialized .NET Streams and pipes for full duplex in-proc communication, web sockets, and multiplexing","archived":false,"fork":false,"pushed_at":"2025-03-21T22:34:21.000Z","size":3853,"stargazers_count":667,"open_issues_count":27,"forks_count":63,"subscribers_count":13,"default_branch":"main","last_synced_at":"2025-03-23T23:17:47.979Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://dotnet.github.io/Nerdbank.Streams/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dotnet.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE-OF-CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"aarnott","custom":"https://keybase.io/aarnott"}},"created_at":"2015-10-07T04:48:20.000Z","updated_at":"2025-03-20T17:05:57.000Z","dependencies_parsed_at":"2023-02-17T02:16:39.932Z","dependency_job_id":"44f3f8ed-d290-4b74-8782-7c6bdc531d54","html_url":"https://github.com/dotnet/Nerdbank.Streams","commit_stats":{"total_commits":1470,"total_committers":27,"mean_commits":54.44444444444444,"dds":0.5482993197278911,"last_synced_commit":"8b37dc0145d81663625c10a75af17cb9dbdab14f"},"previous_names":["nerdcash/nerdbank.streams","dotnet/nerdbank.streams","aarnott/nerdbank.streams","aarnott/nerdbank.fullduplexstream"],"tags_count":99,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FNerdbank.Streams","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FNerdbank.Streams/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FNerdbank.Streams/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dotnet%2FNerdbank.Streams/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dotnet","download_url":"https://codeload.github.com/dotnet/Nerdbank.Streams/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245289857,"owners_count":20591146,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T09:00:43.855Z","updated_at":"2025-03-24T14:33:05.450Z","avatar_url":"https://github.com/dotnet.png","language":"C#","readme":"# Specialized .NET Stream classes\n\n[![NuGet package](https://img.shields.io/nuget/v/Nerdbank.Streams.svg)](https://nuget.org/packages/Nerdbank.Streams)\n[![Build Status](https://dev.azure.com/andrewarnott/OSS/_apis/build/status/Nerdbank.Streams)](https://dev.azure.com/andrewarnott/OSS/_build/latest?definitionId=14)\n[![codecov](https://codecov.io/gh/AArnott/Nerdbank.Streams/branch/main/graph/badge.svg)](https://codecov.io/gh/AArnott/Nerdbank.Streams)\n\n*Enhanced streams for communication in-proc or across the Internet.*\n\n## Features\n\n1. [`SimplexStream`](https://dotnet.github.io/Nerdbank.Streams/docs/SimplexStream.html) is meant to allow two parties to communicate *one direction*.\n   Anything written to the stream can subsequently be read from it. You can share this `Stream`\n   with any two parties (in the same AppDomain) and one can send messages to the other.\n1. [`FullDuplexStream`](https://dotnet.github.io/Nerdbank.Streams/docs/FullDuplexStream.html) creates a pair of bidirectional streams for\n   in-proc two-way communication; it also creates a single bidirectional stream from two\n   unidirectional streams.\n1. [`MultiplexingStream`](https://dotnet.github.io/Nerdbank.Streams/docs/MultiplexingStream.html) allows you to split any bidirectional\n   .NET Stream into many sub-streams (called channels). This allows two parties to establish\n   just one transport stream (e.g. named pipe or web socket) and use it for many independent\n   protocols. For example, one might set up JSON-RPC on one channel and use other channels for\n   efficient binary transfers.\n1. [`AsStream()`](https://dotnet.github.io/Nerdbank.Streams/docs/AsStream.html) wraps a `WebSocket`, `System.IO.Pipelines.PipeReader`,\n   `System.IO.Pipelines.PipeWriter`, or `System.IO.Pipelines.IDuplexPipe` with a\n   `System.IO.Stream` for reading and/or writing.\n1. [`UsePipe()`](https://dotnet.github.io/Nerdbank.Streams/docs/UsePipe.html) enables reading from\n   and writing to a `Stream` or `WebSocket` using the `PipeReader` and `PipeWriter` APIs.\n1. [`Stream.ReadSlice(long)`](https://dotnet.github.io/Nerdbank.Streams/docs/ReadSlice.html) creates a sub-stream that ends after\n   a given number of bytes.\n1. [`PipeReader.ReadSlice(long)`](https://dotnet.github.io/Nerdbank.Streams/docs/ReadSlice.html) creates a sub-`PipeReader` that ends after\n   a given number of bytes.\n1. [`MonitoringStream`](https://dotnet.github.io/Nerdbank.Streams/docs/MonitoringStream.html) wraps another Stream and raises events for\n   all I/O calls so you can monitor and/or trace the data as it goes by.\n1. [`WriteSubstream` and `ReadSubstream`](https://dotnet.github.io/Nerdbank.Streams/docs/Substream.html) allow you to serialize data of\n   an unknown length as part of a larger stream, and later deserialize it such in reading the\n   substream, you cannot read more bytes than were written to it.\n1. [`Sequence\u003cT\u003e`](https://dotnet.github.io/Nerdbank.Streams/docs/Sequence.html) is a builder for `ReadOnlySequence\u003cT\u003e`.\n1. [`PrefixingBufferWriter\u003cT\u003e`](https://dotnet.github.io/Nerdbank.Streams/docs/PrefixingBufferWriter.html) wraps another `IBufferWriter\u003cT\u003e`\n   to allow for prefixing some header to the next written buffer, which may be arbitrarily long.\n1. [`BufferTextWriter`](https://dotnet.github.io/Nerdbank.Streams/docs/BufferTextWriter.html) is a `TextWriter`-derived type that can\n   write directly to any `IBufferWriter\u003cbyte\u003e`, making it more reusable than `StreamWriter`\n   and thus allows for alloc-free writing across many writers.\n1. [`SequenceTextReader`](https://dotnet.github.io/Nerdbank.Streams/docs/SequenceTextReader.html) is a `TextReader`-derived type that can\n   read directly from any `ReadOnlySequence\u003cbyte\u003e`, making it more reusable than `StreamReader`\n   and thus allows for alloc-free reading across many sequences.\n1. [`DuplexPipe`](https://dotnet.github.io/Nerdbank.Streams/docs/DuplexPipe.html) is a trivial implementation of `IDuplexPipe`.\n1. [`Stream.ReadBlockAsync`](https://dotnet.github.io/Nerdbank.Streams/docs/ReadBlockAsync.html) guarantees to fill the supplied buffer except under certain documented conditions, instead of the regular `ReadAsync` guarantee of supplying at least 1 byte.\n\n## .NET Foundation\n\nThis project is supported by the [.NET Foundation](https://dotnetfoundation.org).\n\n## Sponsorships\n\n[\u003cimg src=\"https://api.gitsponsors.com/api/badge/img?id=43795655\" height=\"20\"\u003e](https://api.gitsponsors.com/api/badge/link?p=ImOZElhl40yN+Id6Hg2/oLexrVG9UIpQtoRMDGA8gPCD+IsEisGQs2ZyAndA4TGLn0cX4aHiSw7nSROPscc5ltqnMt3FomBxZzv6fiBY3nVKdILRf8/dM2mrH07jnWbCO6t8tlwcz53xzfFj/E+89A==)\n","funding_links":["https://github.com/sponsors/aarnott","https://keybase.io/aarnott"],"categories":["C\\#","C#","C# #"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet%2FNerdbank.Streams","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdotnet%2FNerdbank.Streams","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdotnet%2FNerdbank.Streams/lists"}