LightDl 0.4.3

dotnet add package LightDl --version 0.4.3
                    
NuGet\Install-Package LightDl -Version 0.4.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="LightDl" Version="0.4.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="LightDl" Version="0.4.3" />
                    
Directory.Packages.props
<PackageReference Include="LightDl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add LightDl --version 0.4.3
                    
#r "nuget: LightDl, 0.4.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package LightDl@0.4.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=LightDl&version=0.4.3
                    
Install as a Cake Addin
#tool nuget:?package=LightDl&version=0.4.3
                    
Install as a Cake Tool

LightDl

LightDl is a lightweight multi-threaded HTTP downloader for .NET with resume support and Native AOT compatibility.

Installation

NuGet:

dotnet add package LightDl

Or add it to your .csproj:

<PackageReference Include="LightDl" Version="0.4.3" />

Usage

using LightDl;

var url = new Uri("https://example.com/file.zip");
var request = LightDownloadRequest.ToDirectory(url, AppContext.BaseDirectory)
    .OnFileInfo(info => Console.WriteLine($"Downloading {info.FileName} ({info.Size} bytes)"))
    .OnProgress(p => Console.Write($"\r{p.ProgressPercentage:F1}%  {p.Speed / 1024 / 1024:F1} MB/s"));

using var downloader = new LightDownloader();
var result = await downloader.DownloadAsync(request);

Console.WriteLine($"\nSaved to: {result.FilePath}");

Pass a directory to use the remote file name, or pass a full file path to choose the output name yourself:

using var downloader = new LightDownloader();
await downloader.DownloadAsync(LightDownloadRequest.ToDirectory(url, @"C:\Downloads\"));
await downloader.DownloadAsync(LightDownloadRequest.ToFile(url, @"C:\Downloads\custom-name.zip"));

String URL overloads are also available for simple scripts:

using var downloader = new LightDownloader();
await downloader.DownloadAsync(LightDownloadRequest.ToDirectory("https://example.com/file.zip", @"C:\Downloads\"));

With options:

var config = new LightDownloadConfig
{
    ChunkCount = 24,
    Proxy = new WebProxy("http://127.0.0.1:8080"),
    UseProxy = true
};

using var downloader = new LightDownloader(config);
await downloader.DownloadAsync(LightDownloadRequest.ToDirectory(url, path));

If the destination file already exists, LightDl renames the new download by default, for example file (1).zip. Set FileConflictPolicy to Overwrite, Fail, or Skip if you want different behavior.

With request headers:

var headers = new Dictionary<string, string>
{
    ["Authorization"] = "Bearer token",
    ["Referer"] = "https://example.com/"
};

using var downloader = new LightDownloader();
await downloader.DownloadAsync(LightDownloadRequest.ToDirectory(url, path, headers));

Parallel downloads:

static async Task<LightDownloadResult> DownloadAsync(Uri url)
{
    using var downloader = new LightDownloader();
    return await downloader.DownloadAsync(
        LightDownloadRequest.ToDirectory(url, @"C:\Downloads\"));
}

var results = await Task.WhenAll(urls.Select(DownloadAsync));

Use one LightDownloader instance per active download; concurrent calls on the same instance are rejected.

Resume support is enabled by default. If the download is interrupted, call DownloadAsync again with the same request to continue.

CLI

Download the Native AOT executable for your platform from GitHub Releases. No .NET runtime installation is required.

Available release targets:

  • Windows: win-x64, win-arm64, win-x86
  • Linux glibc: linux-x64, linux-arm64
  • Linux musl/Alpine: linux-musl-x64, linux-musl-arm64
  • macOS: osx-x64, osx-arm64

Download into a directory:

lightdl https://example.com/file.zip ./downloads

Download to an exact file path:

lightdl https://example.com/file.zip ./downloads/custom.zip --file

Configure workers, conflict handling, or request headers:

lightdl https://example.com/file.zip ./downloads \
  --chunks 8 \
  --conflict skip \
  --header "Authorization: Bearer token"

On Windows, use lightdl.exe. Run lightdl --help to see all options. The default conflict policy is rename, so an existing file is not overwritten.

Releases

Pushing a version tag such as v0.4.3 runs .github/workflows/release.yml. The workflow builds all Native AOT CLI archives, creates LightDl.0.4.3.nupkg, generates SHA-256 checksums, and attaches everything to the GitHub Release.

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net10.0

    • No dependencies.

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
0.4.3 120 8/27/2026
0.4.2 127 8/26/2026
0.4.1 101 8/25/2026
0.4.0 89 8/25/2026
0.3.0 138 7/19/2026
0.2.3 115 7/14/2026
0.2.2 117 7/2/2026
0.2.1 128 7/2/2026
0.2.0 105 7/2/2026
0.1.0 120 6/22/2026