Giter Club home page Giter Club logo

aqueduct's Introduction

Icon

Aqueduct

Utilities and extension methods for working with streams and pipes

Build Codecov NuGet

Overview

Aqueduct provides some useful, albeit niche, utilities for working with streams and pipes.

Pipe/Stream Bifurcation

Allows you to read from a single pipe or stream into multiple targets. This is useful for cases where you can't buffer the original stream into memory or you're working with a source you can't seek. Internally it uses individual pipes per target to allow independent processing and minimal memory overhead.

Each bifurcation target has individual options for:

  • The reader which processes the data
  • An exception handler triggered on failure of any target
  • Control of the number of bytes for blocking/resuming writes to the target
  • The maximum number of bytes to write to the specific target

Additionally, the bifurcation process overall has options for:

  • The minimum read buffer size of the source pipe or stream
  • Whether to leave the stream open after bifurcation
  • Allow exceptions from readers to bubble out to the calling code
  • Cancellation token for reading/writing process

Example usage of pipe/stream bifurcation:

await myStream.BifurcatedReadAsync(
	new BifurcationTargetConfig(
		async (Stream stream, CancellationToken cancellationToken) =>
		{
			using var fileStream = File.OpenWrite("some-file-path.bin");
			await stream.CopyToAsync(fileStream);
		},
		maxTotalBytes: 1024
	),
	new BifurcationTargetConfig(
		async (PipeReader reader, CancellationToken cancellationToken) =>
		{
			await someService.ProcessData(reader);
		}
	)
);

Licensing and Support

Aqueduct is licensed under the MIT license. It is free to use in personal and commercial projects.

There are support plans available that cover all active Turner Software OSS projects. Support plans provide private email support, expert usage advice for our projects, priority bug fixes and more. These support plans help fund our OSS commitments to provide better software for everyone.

aqueduct's People

Contributors

turnerj avatar renovate[bot] avatar

Stargazers

 avatar Joe Nathan Abellard avatar Ernest John avatar Magnus Lindhe avatar Cédric Luthi avatar Lee Seung Hu avatar Thomas Fransham avatar Matthew Severson avatar Kirill Osenkov avatar

Watchers

James Cloos avatar  avatar  avatar

aqueduct's Issues

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/build.yml
  • actions/checkout v3
  • actions/setup-dotnet v3
  • actions/upload-artifact v3
  • actions/checkout v3
  • actions/download-artifact v3
  • codecov/codecov-action v3.1.4
  • actions/upload-artifact v3
  • actions/download-artifact v3
  • actions/download-artifact v3
nuget
src/Directory.Build.props
  • TurnerSoftware.BuildVersioning 0.5.0
  • Microsoft.SourceLink.GitHub 1.1.1
src/TurnerSoftware.Aqueduct/TurnerSoftware.Aqueduct.csproj
  • System.IO.Pipelines 7.0.0

  • Check this box to trigger a request for Renovate to run again on this repository

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.