{"id":19501791,"url":"https://github.com/gregyjames/octanedownloader","last_synced_at":"2026-03-07T06:06:05.221Z","repository":{"id":29850236,"uuid":"33395088","full_name":"gregyjames/OctaneDownloader","owner":"gregyjames","description":"A high performance, multi-threaded C# file download library.","archived":false,"fork":false,"pushed_at":"2024-01-28T08:47:22.000Z","size":5524,"stargazers_count":213,"open_issues_count":5,"forks_count":33,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-05-01T18:23:55.687Z","etag":null,"topics":["c-sharp","download","downloader","hacktoberfest","hacktoberfest-accepted","hacktoberfest2021","multithreading","networking","parallel","threading"],"latest_commit_sha":null,"homepage":"https://www.nuget.org/packages/OctaneEngineCore","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gregyjames.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"gregyjames","ko_fi":"gjames8"}},"created_at":"2015-04-04T05:13:22.000Z","updated_at":"2024-06-14T02:40:24.344Z","dependencies_parsed_at":"2024-01-13T23:18:45.578Z","dependency_job_id":"fe6313f3-92b5-41a1-a105-1faf598b19f1","html_url":"https://github.com/gregyjames/OctaneDownloader","commit_stats":{"total_commits":220,"total_committers":12,"mean_commits":"18.333333333333332","dds":0.5772727272727273,"last_synced_commit":"e44936cabde13e95d40cbcfaf1e8872833f06e49"},"previous_names":[],"tags_count":24,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregyjames%2FOctaneDownloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregyjames%2FOctaneDownloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregyjames%2FOctaneDownloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gregyjames%2FOctaneDownloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gregyjames","download_url":"https://codeload.github.com/gregyjames/OctaneDownloader/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247157281,"owners_count":20893220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c-sharp","download","downloader","hacktoberfest","hacktoberfest-accepted","hacktoberfest2021","multithreading","networking","parallel","threading"],"created_at":"2024-11-10T22:14:01.501Z","updated_at":"2026-03-07T06:06:05.209Z","avatar_url":"https://github.com/gregyjames.png","language":"C#","funding_links":["https://github.com/sponsors/gregyjames","https://ko-fi.com/gjames8"],"categories":[],"sub_categories":[],"readme":"![C#](https://github.com/gregyjames/OctaneDownloader/actions/workflows/dotnet.yml/badge.svg)\n[![CodeQL](https://github.com/gregyjames/OctaneDownloader/actions/workflows/codeql-analysis.yml/badge.svg?branch=master)](https://github.com/gregyjames/OctaneDownloader/actions/workflows/codeql-analysis.yml)\n[![CodeFactor](https://www.codefactor.io/repository/github/gregyjames/octanedownloader/badge)](https://www.codefactor.io/repository/github/gregyjames/octanedownloader)\n[![NuGet latest version](https://badgen.net/nuget/v/OctaneEngineCore)](https://www.nuget.org/packages/OctaneEngineCore)\n![NuGet Downloads](https://img.shields.io/nuget/dt/OctaneEngineCore)\n[![codecov](https://codecov.io/github/gregyjames/OctaneDownloader/branch/master/graph/badge.svg?token=u05rFcLMde)](https://codecov.io/github/gregyjames/OctaneDownloader)\n\n![](https://image.ibb.co/h2tK8v/Untitled_1.png)\n\n\nExperience 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](https://github.com/gregyjames/OCTANE-YoutubeExtractor).\n\n# Installation\n```sh\ndotnet add package OctaneEngineCore\n```\n\n# Features\n* Multipart Downloading\n* Download Retry\n* Progress\n* Throttling\n* Logging\n* Proxy Support\n* Pause/Resume Support\n* JSON/Microsoft.Extensions.Configuration Support\n* Headers\n\n# Usage\n### Program.cs\n```csharp\nconst string url = \"https://plugins.jetbrains.com/files/7973/281233/sonarlint-intellij-7.4.0.60471.zip?updateId=281233\u0026pluginId=7973\u0026family=INTELLIJ\";\n\n// Create engine directly without builder - no DI required (if you don't want it!)\nvar engine = EngineBuilder.Create().WithConfiguration(config =\u003e {\n        config.Parts = 8;\n        config.BufferSize = 8192;\n        config.ShowProgress = true;\n        config.NumRetries = 10;\n        config.BytesPerSecond = 1;\n        config.UseProxy = false;\n        config.LowMemoryMode = false;\n        config.RetryCap = 30;\n}).Build();\n        \n// Setup download\nvar pauseTokenSource = new PauseTokenSource();\nusing var cancelTokenSource = new CancellationTokenSource();\n        \n// Download the file\nengine.DownloadFile(new OctaneRequest(url, null), pauseTokenSource, cancelTokenSource.Token).Wait();  \n```\n## If you want to use Dependency Injection\n### Program.cs\n```csharp\nawait Host.CreateDefaultBuilder(args).UseSerilog((context, configuration) =\u003e\n{\n        configuration\n                .Enrich.FromLogContext()\n                .MinimumLevel.Fatal()\n                .WriteTo.Async(a =\u003e a.File(\"./OctaneLog.txt\"))\n                .WriteTo.Async(a =\u003e a.Console(theme: AnsiConsoleTheme.Sixteen));\n}).ConfigureAppConfiguration(configurationBuilder =\u003e\n{\n        configurationBuilder.AddJsonFile(\"appsettings.json\");\n}).UseOctaneEngine().ConfigureServices(collection =\u003e\n{\n        collection.AddHostedService\u003cDownloadService\u003e();\n}).RunConsoleAsync();\n```\n\n### DownloadService\n```csharp\nusing System.Threading;\nusing System.Threading.Tasks;\nusing Microsoft.Extensions.Hosting;\nusing OctaneEngineCore;\n\nnamespace OctaneTester;\n\npublic class DownloadService(IEngine engine, IHostApplicationLifetime lifetime, ILogger\u003cDownloadService\u003e logger) : BackgroundService\n{\n    private const string Url = \"https://plugins.jetbrains.com/files/7973/281233/sonarlint-intellij-7.4.0.60471.zip?updateId=281233\u0026pluginId=7973\u0026family=INTELLIJ\";\n\n    protected override async Task ExecuteAsync(CancellationToken stoppingToken)\n    {\n        var pauseTokenSource = new PauseTokenSource();\n        logger.LogInformation(\"Current Latency: {latency}\", await engine.GetCurrentNetworkLatency());\n        logger.LogInformation(\"Current Network speed: {speed}\", await engine.GetCurrentNetworkSpeed());\n        await engine.DownloadFile(new OctaneRequest(Url, null), pauseTokenSource, stoppingToken);\n        lifetime.StopApplication();\n    }\n}\n```\n### appsettings.json\n```json\n\"Octane\": {\n    \"Parts\": 8,\n    \"BufferSize\": 8196,\n    \"ShowProgress\": true,\n    \"NumRetries\": 10,\n    \"RetryCap\": 30,\n    \"BytesPerSecond\": 1,\n    \"UseProxy\": false,\n    \"LowMemoryMode\": false\n  }\n```\n# Benchmark\n\n```\nBenchmarkDotNet v0.13.12, Windows 10 (10.0.19045.3803/22H2/2022Update)\n12th Gen Intel Core i7-12700K, 1 CPU, 20 logical and 12 physical cores\n.NET SDK 8.0.100\n[Host] : .NET 6.0.25 (6.0.2523.51912), X64 RyuJIT AVX2 [AttachedDebugger]\nJob-GUGLRW : .NET 6.0.25 (6.0.2523.51912), X64 RyuJIT AVX2\nPlatform=X64 IterationCount=5 WarmupCount=0\n```\n\n| Method | Url | Mean | Error | StdDev |\n|------------------------- |--------------------- |---------:|--------:|---------:|\n| **BenchmarkOctane** | **http:(...)150MB [30]** | **8.773 s** | **1.321 s** | **0.3430 s** |\n| BenchmarkOctaneLowMemory | http:(...)150MB [30] | 8.999 s | 0.5978 s | 0.0925 s |\n| BenchmarkHttpClient | http:(...)150MB [30] | 8.648 s | 0.7375 s | 0.1915 s |\n| **BenchmarkOctane** | **https(...)250MB [31]** | **14.335 s** | **2.095 s** | **0.5440 s** |\n| BenchmarkOctaneLowMemory | https(...)250MB [31] | 14.159 s | 1.7879 s | 0.4643 s |\n| BenchmarkHttpClient | https(...)250MB [31] | 15.775 s | 2.2267 s | 0.3446 s |\n| **BenchmarkOctane** | **https(...)500MB [31]** | **28.262 s** | **1.876 s** | **0.2904 s** |\n| BenchmarkOctaneLowMemory | https(...)500MB [31] | 27.303 s | 1.0371 s | 0.2693 s |\n| BenchmarkHttpClient | https(...)500MB [31] | 31.325 s | 1.7619 s | 0.2727 s |\n\n# License\nThe MIT License (MIT)\n\nCopyright (c) 2015 Greg James\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\n# Contributors\n![GitHub Contributors Image](https://contrib.rocks/image?repo=gregyjames/OctaneDownloader)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregyjames%2Foctanedownloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregyjames%2Foctanedownloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregyjames%2Foctanedownloader/lists"}