A small stateless utility to download remote files without external dependencies
- concurrent split download
- resume downloads
- progress
- abort (
CancellationToken
) - stateless
- auth header
- speed meter
- pause/resume
- proxy pool
- throttling
[ ] contentMD5 verify
- more refactoring
- implement missing features
- xunit tests 🤔
- priorities
- pool with semaphores
NB. disk's space is preallocated
Install Package
Install-Package Oibi.Downloader
using Oibi.Download;
using System;
using System.IO;
using System.Threading.Tasks;
namespace Oibi.Downloader.Demo
{
internal class Program
{
private static async Task Main()
{
var settings = new FileDownloadSettings
{
RemoteResource = new Uri("http://test.kpnqwest.it/file2000.bin"),
LocalResource = new FileInfo(@"C:\Users\Fabio\Downloads\.downloader\2GB.bin")
};
var dl = new DotDownloader(settings);
var task = dl.DownloadAsync();
do
{
await Task.Delay(111);
Console.Write($"Progress: {dl.Progress * 100:0.00}%\r");
} while (dl.Progress != 1d);
Console.WriteLine("DOWNLOAD COMPLETED");
await task;
}
}
}