Install-Package Espresso3389.HttpStream -Version
dotnet add package Espresso3389.HttpStream --version
<PackageReference Include="Espresso3389.HttpStream" Version="" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Espresso3389.HttpStream --version
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Espresso3389.HttpStream,"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. 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=

// Install Espresso3389.HttpStream as a Cake Tool
#tool nuget:?package=Espresso3389.HttpStream&version=
The NuGet Team does not provide support for this client. Please contact its maintainers for support.


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 take 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: HttpStream.

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

PM> Install-Package HttpStream

Supported Platforms

This module is built against .NET Platform Standard 1.6 (netstandard1.6) and it's compatible with the following platforms:

  • .NET Core 1.0
  • .NET Framework 4.6.1
  • Universal Windows Platform 10.0.16299
  • Mono 4.6
  • Xamarin.iOS 10.0
  • Xamarin.Mac 3.0
  • Xamarin.Android 7.0

For more information, see the illustration on Mapping the .NET Platform Standard to platforms - .NET Platform Standard.

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(@"");
var cacheSize = 1024 * 64;
var httpStream = new HttpStream.HttpStream(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));


The codes/binaries are licensed under MIT License.

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 - MongoDB for .NET integration tests
Version Downloads Last updated 533 2/20/2019
2.0.37 1,490 7/26/2016
2.0.33 893 7/26/2016
2.0.32 914 7/26/2016
2.0.22 1,039 7/12/2016