Lyo.Streams
1.0.0
dotnet add package Lyo.Streams --version 1.0.0
NuGet\Install-Package Lyo.Streams -Version 1.0.0
<PackageReference Include="Lyo.Streams" Version="1.0.0" />
<PackageVersion Include="Lyo.Streams" Version="1.0.0" />
<PackageReference Include="Lyo.Streams" />
paket add Lyo.Streams --version 1.0.0
#r "nuget: Lyo.Streams, 1.0.0"
#:package Lyo.Streams@1.0.0
#addin nuget:?package=Lyo.Streams&version=1.0.0
#tool nuget:?package=Lyo.Streams&version=1.0.0
Lyo.Streams
Common stream implementations including TeeStream, CountingStream, ProgressStream, ConcatenatedStream, etc. (incremental hashing lives in Lyo.Hashing: HashingStream).
Features
- TeeStream – Duplicate stream output to multiple destinations
- CountingStream – Track bytes read or written
- ProgressStream – Report progress during stream operations
- ConcatenatedStream – Sequentially read from multiple streams
- DeterministicPayloadStream – Read-only generator of a fixed-length deterministic byte sequence from a seed (no full-buffer allocation);
DefaultSeedis shared withLyo.Testing.TestDataandBenchmarkData - NullingStream – Write-only consuming sink that discards bytes (throughput / drain consumer)
- StreamExtensions –
CopyToAsyncwith optionalIProgress<long>(cumulative bytes written) - StreamChunkSizeHelper – Determine optimal buffer size for stream operations
Examples
Quick Start
using Lyo.Streams;
using Lyo.Hashing;
using System.Security.Cryptography;
// Hash while reading — use Lyo.Hashing.HashingStream
using var hashingStream = new HashingStream(sourceStream, SHA256.Create());
await hashingStream.CopyToAsync(destinationStream);
var hash = hashingStream.GetHash();
// Tee to multiple outputs
using var tee = new TeeStream(inputStream, stream1, stream2);
await tee.CopyToAsync(outputStream);
// Concatenate multiple streams
var streams = new[] { stream1, stream2, stream3 };
using var concatenated = new ConcatenatedStream(streams);
await concatenated.CopyToAsync(outputStream);
// Copy with progress (IProgress<long> reports cumulative bytes written)
var progress = new Progress<long>(bytes => Console.WriteLine($"Copied {bytes} bytes"));
await source.CopyToAsync(destination, bufferSize: 81920, progress: progress);
Deterministic payload and nulling sink
using Lyo.Streams;
// Generate 100 MiB of seeded bytes without allocating a 100 MiB array
await using var input = new DeterministicPayloadStream(length: 100L * 1024 * 1024);
await using var sink = new NullingStream();
await input.CopyToAsync(sink);
Console.WriteLine($"Drained {sink.BytesWritten} bytes");
Dependencies
Generated from ProjectReference / PackageReference (same model as docs/Lyo.ProjectGraph.html).
Lyo.Exceptions— (direct, lyo)System.Buffers4.6.1— (direct, microsoft, netstandard2.0)System.Memory4.6.3— (direct, microsoft, netstandard2.0)
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Lyo.Exceptions (>= 1.0.0)
- System.Buffers (>= 4.6.1)
- System.Memory (>= 4.6.3)
-
net10.0
- Lyo.Exceptions (>= 1.0.0)
NuGet packages (3)
Showing the top 3 NuGet packages that depend on Lyo.Streams:
| Package | Downloads |
|---|---|
|
Lyo.Encryption
A production-ready .NET encryption library providing secure, authenticated encryption with support for multiple algorithms (AES-GCM, ChaCha20Poly1305, RSA), key management, and envelope encryption patterns. |
|
|
Lyo.Compression
A production-ready .NET compression library providing efficient, thread-safe compression for the built-in BCL algorithms (GZip, Deflate, and on net10+ Brotli, ZLib). Additional algorithms (LZ4, LZMA, Snappier, Zstd, BZip2, XZ) ship as separate Lyo.Compression.* addon packages so consumers only pay for what they use. |
|
|
Lyo.FileStorage
File storage service interface and base implementation for file operations. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 178 | 8/16/2026 |