• Stars
    star
    227
  • Rank 174,919 (Top 4 %)
  • Language
    C#
  • License
    MIT License
  • Created over 9 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A high performance, multi-threaded C# file download library.

C# CodeQL CodeFactor codebeat badge Codacy Badge NuGet latest version Nuget

alt tag

A high Performance C# file downloader that asyncrounously downloads files as pieces. Made as a faster, more efficent replacement to Microsoft's WebClient.Want to see the library in action? Check out 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

Usage

private const string Url = "https://plugins.jetbrains.com/files/7973/281233/sonarlint-intellij-7.4.0.60471.zip?updateId=281233&pluginId=7973&family=INTELLIJ";
private static void Main()
{
     //Logging Setup
     var seriLog = new LoggerConfiguration()
          .Enrich.FromLogContext()
          .MinimumLevel.Verbose()
          .WriteTo.File("./OctaneLog.txt")
          .WriteTo.Console(theme: AnsiConsoleTheme.Sixteen)
          .CreateLogger();
     var factory = LoggerFactory.Create(logging => {
          logging.AddSerilog(seriLog);
     });

     //JSON Config Loading
     var builder = new ConfigurationBuilder();
     builder.SetBasePath(Directory.GetCurrentDirectory())
          .AddJsonFile("appsettings.json", true, true);
     var configRoot = builder.Build();
     var config = new OctaneConfiguration(configRoot, factory);
            
     //Find Optimal number of parts
     var optimalNumberOfParts = Engine.GetOptimalNumberOfParts(Url).Result;
     seriLog.Information("Optimal number of parts to download file: {OptimalNumberOfParts}", optimalNumberOfParts);
            
     seriLog.Information("Speed: {Result}", NetworkAnalyzer.GetCurrentNetworkSpeed().Result);
     seriLog.Information("Latency: {Result}", NetworkAnalyzer.GetCurrentNetworkLatency().Result);
     var pauseTokenSource = new PauseTokenSource();
     var cancelTokenSource = new CancellationTokenSource();
            
     var octaneEngine = new Engine(factory, config);
     octaneEngine.DownloadFile(Url, null, pauseTokenSource, cancelTokenSource).Wait(cancelTokenSource.Token);
        

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

GitHub Contributors Image

More Repositories

1

ZenithTA

A high performance python technical analysis library written in Rust and the Numpy C API.
Rust
215
star
2

AIPortfolio

Use AI to generate a optimized stock portfolio
Python
39
star
3

stocktwits-sentiment

Stocktwits market sentiment analysis in Python with Keras and TensorFlow.
Python
28
star
4

CAPM

Capital Asset Pricing Model implementation in python to analyze stock risk and return.
Python
23
star
5

Seedly

Seedly: a self hosted seedbox written in Blazor and C#.
HTML
12
star
6

insidebarscanner

Scan every stock listed on the Nasdaq to find those with daily inside bars for trading,
Python
11
star
7

twitter-stock-sentiment

Use twitter to get live and trending stock sentiment!
Python
10
star
8

PasteBin-API

C# Wrapper for pastebin!
C#
8
star
9

insta.js

A simple way to download images from instagram.
Python
8
star
10

FileBrowser

A file browser control for C#
C#
7
star
11

tsunami

A High Performance C# wrapper that allows you to get the benefits of SIMD Intrinsics on List<T>.
C#
7
star
12

OctaneEnginePP

A portable, high performance, multithreaded C++ file downloading library built on libcurl and boost::asio.
C++
6
star
13

scriptic

ScripTric is a C# library dedicated to making creating quality code in C# faster and easier.
C#
6
star
14

GEdit

A text editor written in c#.
C#
6
star
15

Lycan

A framework for responding to browser events outside the browser
C#
5
star
16

VolumeProfiles

Use volume transactions to find significant price levels
Python
5
star
17

Birdy

A simple tool to analyze key data about your twitter following/followers.
Python
4
star
18

NewSent

Using Google News for Sentiment Analysis on a keyword.
Python
3
star
19

ProgressStream

Memory Efficient C# Streams that return progress.
C#
3
star
20

MinimalAzureGoAPI

Minimal Azure Go API Server Template.
Go
3
star
21

BitPortSharp

C# Wrapper for the BitPort API.
C#
2
star
22

RustDecisionTree

Decision Tree implemented in rust
Rust
1
star
23

Instatag

Find the most popular hashtags to use without logging in!
Python
1
star
24

CongressionalTradeScanner

C#
1
star
25

GBtoTiny

Genbank to TinyDB.
Python
1
star
26

Uplogger

A self hosted logging server for C#.
1
star
27

WeatherFX

A .Net library for recovering weather information portraying to a specific location.
C#
1
star
28

stockscanner

Scan for stocks matching certain requirements.
1
star
29

TorrentService

An app to monitor a directory and concurrently download new torrents as they are added. Built using Rx, TPL DataFlow, and MonoTorrent.
C#
1
star
30

Tectonic

A python library for real estate modeling and evaluation
Python
1
star
31

ReQueue

C# Library to use a redis list for messaging.
C#
1
star
32

SlowReverbMaker

C# Experiment to create slowed reverbed remixes of songs
C#
1
star
33

LogWrapper

Use your Microsoft.Extensions.ILoggers with legacy systems that use hardcoded logging abstractions.
C#
1
star