OctaneEngineCore 8.3.5
dotnet add package OctaneEngineCore --version 8.3.5
NuGet\Install-Package OctaneEngineCore -Version 8.3.5
<PackageReference Include="OctaneEngineCore" Version="8.3.5" />
<PackageVersion Include="OctaneEngineCore" Version="8.3.5" />
<PackageReference Include="OctaneEngineCore" />
paket add OctaneEngineCore --version 8.3.5
#r "nuget: OctaneEngineCore, 8.3.5"
#:package OctaneEngineCore@8.3.5
#addin nuget:?package=OctaneEngineCore&version=8.3.5
#tool nuget:?package=OctaneEngineCore&version=8.3.5
Experience a powerful, piecewise file downloader for C#, designed to asynchronously fetch files in segments. It’s built to outperform Microsoft’s WebClient with greater speed and efficiency. Curious to see it in action? Check out the Octane YouTube Extractor.
Installation
dotnet add package OctaneEngineCore
Features
- Multipart Downloading
- Download Retry
- Progress
- Throttling
- Logging
- Proxy Support
- Pause/Resume Support
- JSON/Microsoft.Extensions.Configuration Support
- Headers
Usage
Program.cs
const string url = "https://plugins.jetbrains.com/files/7973/281233/sonarlint-intellij-7.4.0.60471.zip?updateId=281233&pluginId=7973&family=INTELLIJ";
// Create engine directly without builder - no DI required (if you don't want it!)
var engine = EngineBuilder.Create().WithConfiguration(config => {
config.Parts = 8;
config.BufferSize = 8192;
config.ShowProgress = true;
config.NumRetries = 10;
config.BytesPerSecond = 1;
config.UseProxy = false;
config.LowMemoryMode = false;
config.RetryCap = 30;
}).Build();
// Setup download
var pauseTokenSource = new PauseTokenSource();
using var cancelTokenSource = new CancellationTokenSource();
// Download the file
engine.DownloadFile(new OctaneRequest(url, null), pauseTokenSource, cancelTokenSource.Token).Wait();
If you want to use Dependency Injection
Program.cs
await Host.CreateDefaultBuilder(args).UseSerilog((context, configuration) =>
{
configuration
.Enrich.FromLogContext()
.MinimumLevel.Fatal()
.WriteTo.Async(a => a.File("./OctaneLog.txt"))
.WriteTo.Async(a => a.Console(theme: AnsiConsoleTheme.Sixteen));
}).ConfigureAppConfiguration(configurationBuilder =>
{
configurationBuilder.AddJsonFile("appsettings.json");
}).UseOctaneEngine().ConfigureServices(collection =>
{
collection.AddHostedService<DownloadService>();
}).RunConsoleAsync();
DownloadService
using System.Threading;
using System.Threading.Tasks;
using Microsoft.Extensions.Hosting;
using OctaneEngineCore;
namespace OctaneTester;
public class DownloadService(IEngine engine, IHostApplicationLifetime lifetime, ILogger<DownloadService> logger) : BackgroundService
{
private const string Url = "https://plugins.jetbrains.com/files/7973/281233/sonarlint-intellij-7.4.0.60471.zip?updateId=281233&pluginId=7973&family=INTELLIJ";
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
{
var pauseTokenSource = new PauseTokenSource();
logger.LogInformation("Current Latency: {latency}", await engine.GetCurrentNetworkLatency());
logger.LogInformation("Current Network speed: {speed}", await engine.GetCurrentNetworkSpeed());
await engine.DownloadFile(new OctaneRequest(Url, null), pauseTokenSource, stoppingToken);
lifetime.StopApplication();
}
}
appsettings.json
"Octane": {
"Parts": 8,
"BufferSize": 8196,
"ShowProgress": true,
"NumRetries": 10,
"RetryCap": 30,
"BytesPerSecond": 1,
"UseProxy": false,
"LowMemoryMode": false
}
Benchmark
BenchmarkDotNet v0.13.12, Windows 10 (10.0.19045.3803/22H2/2022Update)
12th Gen Intel Core i7-12700K, 1 CPU, 20 logical and 12 physical cores
.NET SDK 8.0.100
[Host] : .NET 6.0.25 (6.0.2523.51912), X64 RyuJIT AVX2 [AttachedDebugger]
Job-GUGLRW : .NET 6.0.25 (6.0.2523.51912), X64 RyuJIT AVX2
Platform=X64 IterationCount=5 WarmupCount=0
Method | Url | Mean | Error | StdDev |
---|---|---|---|---|
BenchmarkOctane | http:(...)150MB [30] | 8.773 s | 1.321 s | 0.3430 s |
BenchmarkOctaneLowMemory | http:(...)150MB [30] | 8.999 s | 0.5978 s | 0.0925 s |
BenchmarkHttpClient | http:(...)150MB [30] | 8.648 s | 0.7375 s | 0.1915 s |
BenchmarkOctane | https(...)250MB [31] | 14.335 s | 2.095 s | 0.5440 s |
BenchmarkOctaneLowMemory | https(...)250MB [31] | 14.159 s | 1.7879 s | 0.4643 s |
BenchmarkHttpClient | https(...)250MB [31] | 15.775 s | 2.2267 s | 0.3446 s |
BenchmarkOctane | https(...)500MB [31] | 28.262 s | 1.876 s | 0.2904 s |
BenchmarkOctaneLowMemory | https(...)500MB [31] | 27.303 s | 1.0371 s | 0.2693 s |
BenchmarkHttpClient | https(...)500MB [31] | 31.325 s | 1.7619 s | 0.2727 s |
License
The MIT License (MIT)
Copyright (c) 2015 Greg James
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Contributors
Product | Versions 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 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 was computed. 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. |
-
net8.0
- CommunityToolkit.HighPerformance (>= 8.4.0)
- Microsoft.Extensions.Configuration (>= 9.0.7)
- Microsoft.Extensions.Configuration.Json (>= 9.0.7)
- Microsoft.Extensions.Hosting.Abstractions (>= 9.0.7)
- Microsoft.Extensions.Logging (>= 9.0.7)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 9.0.7)
- System.Reactive (>= 6.0.1)
- ZString (>= 2.6.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last Updated | |
---|---|---|---|
8.3.5 | 185 | 7/20/2025 | |
8.3.4 | 182 | 7/20/2025 | |
8.3.3 | 185 | 7/20/2025 | |
8.3.2 | 185 | 7/20/2025 | |
8.3.1 | 185 | 7/20/2025 | |
8.3.0 | 20 | 7/19/2025 | |
8.2.0 | 290 | 2/12/2025 | |
8.1.0 | 137 | 2/12/2025 | |
8.0.6 | 296 | 2/9/2025 | |
8.0.5 | 427 | 1/22/2025 | |
8.0.4 | 4,845 | 8/5/2024 | |
8.0.3 | 666 | 6/14/2024 | |
8.0.2 | 185 | 6/11/2024 | |
8.0.1 | 130 | 6/11/2024 | |
8.0.0 | 922 | 1/23/2024 | |
7.0.2 | 379 | 1/7/2024 | |
7.0.1 | 292 | 1/7/2024 | |
7.0.0 | 285 | 1/7/2024 | |
6.0.4 | 349 | 1/6/2024 | |
6.0.1 | 362 | 12/29/2023 | |
6.0.0 | 1,047 | 4/2/2023 | |
5.0.0 | 727 | 2/21/2023 | |
4.4.1 | 668 | 2/19/2023 | |
4.4.0 | 620 | 2/18/2023 | |
4.3.1 | 621 | 2/18/2023 | |
4.3.0 | 671 | 2/18/2023 | |
4.2.0 | 703 | 2/5/2023 | |
4.1.0 | 618 | 2/5/2023 | |
4.0.0 | 731 | 1/19/2023 | |
3.2.0 | 723 | 12/17/2022 | |
3.1.0 | 745 | 11/19/2022 | |
2.1.0 | 963 | 12/8/2021 | |
2.0.0 | 728 | 12/7/2021 | |
1.0.0 | 1,854 | 7/10/2020 |