AmpScm.Buckets 0.5.0

dotnet add package AmpScm.Buckets --version 0.5.0                
NuGet\Install-Package AmpScm.Buckets -Version 0.5.0                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="AmpScm.Buckets" Version="0.5.0" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add AmpScm.Buckets --version 0.5.0                
#r "nuget: AmpScm.Buckets, 0.5.0"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install AmpScm.Buckets as a Cake Addin
#addin nuget:?package=AmpScm.Buckets&version=0.5.0

// Install AmpScm.Buckets as a Cake Tool
#tool nuget:?package=AmpScm.Buckets&version=0.5.0                

Generic bucket library

This library provides a generalized zero-copy lazy bucket implementation to allow reading information chunks at a time. The buckets are expliclity designed to be minimalistic and stackable.

Every bucket must at least implement a ReadAsync(int requested=MaxRead) implementation that allows reading some bytes from the bucket. The caller provides a maximum number of bytes that it can handle as response, while the implementation provides as many bytes as possible without doing additional work such as copying. The implementation returns at least one byte or the special EOF marker when it can provide data, otherwise it waits -using the .Net async patter- until it can provide at least one byte. The data returned by the Bucket is valid until the next .Read*Async() call.

To help buckets that read from other buckets there are a number of optional extensions.

  • The method Peek() returns the data the next read will provide, without actually reading the data.
  • The method ReadSkipAsync() allows skipping a number of bytes. By default by just reading the data, but implementations may do this more efficient.
  • The method ReadRemainingAsync() returns the remaining number of bytes in the bucket (if known).
  • The property Position returns an absolute position within the data
  • The method Reset() -when implemented+supported- allows resetting the bucket to allow restarting the read operation
  • The method Duplicate() -when implemented+supported- allows duplicating the bucket to allow reading the data twice
  • The method ReadUntilEolAsync() allows reading data from the bucket until the next newline.

Technically all of these methods are optional, but most have default implementations and/or properties to check if the features are supported. Via many helper and conveniance methods quite a few features are added on top. Things like combining results, buffering, filtering and EOL normalization can easily be stacked.

Many basic bucket types are provided.

  • file bucket
  • memory bucket
  • socket bucket
  • aggregate bucket
  • compression and decompression (ZLib, Deflate, GZip, BZip)
  • hash bucket
  • several kind of limit buckets
  • trace and verify buckets (for debugging bucket issues
  • buffer buckets
  • text normalization

This library provides the bare layer for all these features, and is further extended via the AmpScmp.Buckets.Git, AmpScmp.Buckets.Security, AmpScm.Buckets.Subversion packages to provide several file format implementations.

The AmpScm.Git.Repository package brings all of these packages together in a fully managed git repository implementation that can directly read all the git fileformats using the transformations provided by this library.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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 is compatible. 
.NET Framework net47 is compatible.  net471 was computed.  net472 was computed.  net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (3)

Showing the top 3 NuGet packages that depend on AmpScm.Buckets:

Package Downloads
AmpScm.Buckets.Git

Package Description

AmpScm.Buckets.Security

Package Description

AmpScm.Buckets.Subversion

Package Description

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.5.0 99 8/5/2024
0.4.0 363 3/31/2023
0.3.2 1,055 5/12/2022
0.3.1 102 5/12/2022
0.3.0 1,072 4/11/2022
0.2.0 1,091 2/4/2022
0.0.1 800 2/1/2022