Espresso3389.HttpStream 2.0.68

dotnet add package Espresso3389.HttpStream --version 2.0.68                
NuGet\Install-Package Espresso3389.HttpStream -Version 2.0.68                
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="Espresso3389.HttpStream" Version="2.0.68" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Espresso3389.HttpStream --version 2.0.68                
#r "nuget: Espresso3389.HttpStream, 2.0.68"                
#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 Espresso3389.HttpStream as a Cake Addin
#addin nuget:?package=Espresso3389.HttpStream&version=2.0.68

// Install Espresso3389.HttpStream as a Cake Tool
#tool nuget:?package=Espresso3389.HttpStream&version=2.0.68                

HttpStream

This C# project implements randomly accessible stream on HTTP 1.1 transport. Typically, HttpClient provides almost all HTTP features but it just provides us with a way to download a file completely. The implementation takes advantage of HTTP 1.1 range access or on fallback case, it uses HTTP/1.0 sequential download anyway.

Source Code

The source code is available at GitHub.

NuGet Package

A prebuilt NuGet package is available: Espresso3389.HttpStream.

To install HttpStream, run the following command in the Package Manager Console:

PM> Install-Package Espresso3389.HttpStream

Supported Platforms

This module is built against .NET Platform Standard 2.0 (netstandard2.0). For compatible .NET implementations, see .NET Standard - .NET implementation support.

Simple Usage

using Espresso3389.HttpStream;

// cache stream
var fs = File.Create("cache.jpg");

// The third parameter, true indicates that the httpStream will close the cache stream.
var uri = new Uri("https://example.com/somewhere/some-large-image.jpg");
var cacheSize = 1024 * 64;
var httpStream = await HttpStream.CreateAsync(uri, fs, true, cacheSize, null);


// RangeDownloaded is called on every incremental download
httpStream.RangeDownloaded += (sender, e) =>
{
  Console.WriteLine("Progress: {0}%", (int)(100 * httpStream.CachedRatio));
};

// The following code actually invokes download whole the file
// You can use BufferedStream to improve I/O performance.
var bmp = await BitmapFactory.DecodeStreamAsync(new BufferedStream(httpStream, cacheSize));

License

The codes/binaries are licensed under MIT License.

Product 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. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETStandard 2.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories (1)

Showing the top 1 popular GitHub repositories that depend on Espresso3389.HttpStream:

Repository Stars
Mongo2Go/Mongo2Go
Mongo2Go - MongoDB for .NET integration tests
Version Downloads Last updated
2.0.68 295 2/8/2024
2.0.52.3 1,624 2/20/2019
2.0.37 1,914 7/26/2016
2.0.33 1,342 7/26/2016
2.0.32 1,326 7/26/2016
2.0.22 1,459 7/12/2016

2.0.68.0; 825ccf06261cec32aa7ac211630db11f246b1b4e; development