Sewer56.DeltaPatchGenerator
2.0.1
dotnet add package Sewer56.DeltaPatchGenerator --version 2.0.1
NuGet\Install-Package Sewer56.DeltaPatchGenerator -Version 2.0.1
<PackageReference Include="Sewer56.DeltaPatchGenerator" Version="2.0.1" />
paket add Sewer56.DeltaPatchGenerator --version 2.0.1
#r "nuget: Sewer56.DeltaPatchGenerator, 2.0.1"
// Install Sewer56.DeltaPatchGenerator as a Cake Addin #addin nuget:?package=Sewer56.DeltaPatchGenerator&version=2.0.1 // Install Sewer56.DeltaPatchGenerator as a Cake Tool #tool nuget:?package=Sewer56.DeltaPatchGenerator&version=2.0.1
Delta Patch Generator Lib by Sewer56
This is an easy to comsume, fast library for generating Delta Patches. Note: API is folder based. All operations act on folders and effect all files inside.
Basic Usage: Verify Files
Generate Hash Set:
// Generate a set of hashes for a directory.
var hashes = HashSet.Generate(Assets.MismatchFolderOriginal);
Verify:
// missingFiles: Files missing from target folder.
// hashMismatches: Files with a non-matching hash.
bool matches = HashSet.Verify(hashes, targetFolder, out var missingFiles, out var hashMismatches)
Basic Usage: Generate Patch
Generate:
// Create a patch that transforms one folder into another.
// Save it into `patchFolder`
var patch = Patch.Generate(originalFolder, targetFolder, patchFolder);
Apply:
// Patches all files in folderToPatch. Patched files are moved to patchedFilesOutput.
Patch.Apply(patch, folderToPatch, patchedFilesOutput);
- Patches use VCDiff based Delta Compression using an optimized port of Google
open-vcdiff
.
Basic Usage: Cleanup
Delta generator can also be used to remove any files outside of a provided list of files.
// Make Hashes
var hashes = HashSet.Generate(Assets.AddMissingFileFolderOriginal);
// Remove extra files.
HashSet.Cleanup(hashes, folder);
You can supply an event/function that can be used to confirm whether a file can be deleted.
Basic Usage: General
Results of most operations (e.g. Patch.Generate()
, HashSet.Generate()
) and be saved and loaded from disk.
Limitations
RAM: Memory usage explodes relative to file size. When creating a patch for a 1.5GB file, expect 6GB+ RAM usage. Applying patches is pretty much free though.
File Size: Max file size for individual file is 2GB.
Additional Credits
VCDiff Implementation
- Folks at Google for creating open-vcdiff.
- Metric for porting open-vcdiff to .NET.
- SnowflakePowered (Ronny Chan) for optimizing the .NET port of open-vcdiff.
Additional optimisations by myself 😃
Hashing Implementation
- Yann Collet for creating the
xxHash
hashing algorithm. - Melnik Alexander for high performance port of
xxHash
.
Doki Doki Literature Club
- A Product of Team Salvato.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. 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. |
.NET Core | netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.1 is compatible. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Sewer56.VCDiff (>= 3.4.0)
- Standart.Hash.xxHash (>= 3.1.0)
- System.Text.Json (>= 5.0.2)
-
.NETStandard 2.1
- Sewer56.VCDiff (>= 3.4.0)
- Standart.Hash.xxHash (>= 3.1.0)
- System.Text.Json (>= 5.0.2)
-
net5.0
- Sewer56.VCDiff (>= 3.4.0)
- Standart.Hash.xxHash (>= 3.1.0)
-
net6.0
- Sewer56.VCDiff (>= 3.4.0)
- Standart.Hash.xxHash (>= 3.1.0)
- System.Text.Json (>= 5.0.2)
NuGet packages (1)
Showing the top 1 NuGet packages that depend on Sewer56.DeltaPatchGenerator:
Package | Downloads |
---|---|
Sewer56.Update.Packaging
The packaging component of Sewer56.Update. Contains the necessary component for creating packages and releases. |
GitHub repositories
This package is not used by any popular GitHub repositories.