All Projects → jzebedee → deltaq

jzebedee / deltaq

Licence: other
Fast and portable delta encoding for .NET in 100% safe, managed code.

Programming Languages

C#
18002 projects
shell
77523 projects

Projects that are alternatives of or similar to deltaq

libsais
libsais is a library for linear time suffix array, longest common prefix array and burrows wheeler transform construction based on induced sorting algorithm.
Stars: ✭ 81 (+211.54%)
Mutual labels:  bwt, suffix-array, divsufsort, sais
Jsondiffpatch
Diff & patch JavaScript objects
Stars: ✭ 3,951 (+15096.15%)
Mutual labels:  diff, delta, patch
dipa
dipa makes it easy to efficiently delta encode large Rust data structures.
Stars: ✭ 243 (+834.62%)
Mutual labels:  diff, delta, patch
Hdiffpatch
a C\C++ library and command-line tools for Diff & Patch between binary files or directories(folder); cross-platform; run fast; create small delta/differential; support large files and limit memory requires when diff & patch.
Stars: ✭ 459 (+1665.38%)
Mutual labels:  diff, patch
Gojsondiff
Go JSON Diff
Stars: ✭ 371 (+1326.92%)
Mutual labels:  diff, patch
Similar
A high level diffing library for rust based on diffs
Stars: ✭ 386 (+1384.62%)
Mutual labels:  diff, patch
Diffson
A scala diff/patch library for Json
Stars: ✭ 258 (+892.31%)
Mutual labels:  diff, patch
Delta
A syntax-highlighting pager for git, diff, and grep output
Stars: ✭ 11,555 (+44342.31%)
Mutual labels:  diff, delta
Patch Package
Fix broken node modules instantly 🏃🏽‍♀️💨
Stars: ✭ 6,062 (+23215.38%)
Mutual labels:  diff, patch
Python Patch
Library to parse and apply unified diffs
Stars: ✭ 65 (+150%)
Mutual labels:  diff, patch
go-bsdiff
Golang wrapper for @mendsley's bsdiff C library.
Stars: ✭ 20 (-23.08%)
Mutual labels:  bsdiff, patch
Ex audit
Ecto auditing library that transparently tracks changes and can revert them.
Stars: ✭ 214 (+723.08%)
Mutual labels:  diff, patch
diffy
Tools for finding and manipulating differences between files
Stars: ✭ 47 (+80.77%)
Mutual labels:  diff, patch
Gsync
gSync is an rsync based library for sending delta updates of files to a remote server.
Stars: ✭ 344 (+1223.08%)
Mutual labels:  diff, patch
Diff Match Patch
Diff Match Patch is a high-performance library in multiple languages that manipulates plain text.
Stars: ✭ 4,910 (+18784.62%)
Mutual labels:  diff, patch
Editscript
A library designed to diff and patch Clojure data structures
Stars: ✭ 281 (+980.77%)
Mutual labels:  diff, patch
Git Follow
Follow lifetime changes of a pathspec in Git.
Stars: ✭ 25 (-3.85%)
Mutual labels:  diff, patch
vcdiff
Heavily optimized .NET Core vcdiff library
Stars: ✭ 16 (-38.46%)
Mutual labels:  diff, vcdiff
tmux-eaw-fix
tmux 2.6 以降において East Asian Ambiguous Character を全角文字の幅で表示する
Stars: ✭ 16 (-38.46%)
Mutual labels:  diff, patch
Apkdiffpatch
a C++ library and command-line tools for Zip(Jar,Apk) file Diff & Patch; create minimal delta/differential; support Jar sign(apk v1 sign) & apk v2,v3 sign .
Stars: ✭ 121 (+365.38%)
Mutual labels:  diff, patch

DeltaQ logo DeltaQ

Fast and portable delta encoding for .NET in 100% safe, managed code.

DeltaQ is available for use as a library in .NET and .NET Framework, and as a cross-platform command-line tool, dq, which can be used to perform delta operations (similar to bsdiff or xdelta).

Support

Discussion and technical support is available on Discord.

Discord

Installing

dq command-line tool

DeltaQ.CommandLine nuget package

> dotnet tool install DeltaQ.CommandLine -g

DeltaQ library

DeltaQ nuget package

> dotnet add package DeltaQ

Usage

dq command-line tool

Create a binary delta (diff) with BsDiff

dq bsdiff <oldfile> <newfile> <deltafile>

Here's an example of dq creating a bsdiff delta for patching file app_v1.exe into app_v2.exe:

> ls -sh
total 32M
16M app_v1.exe  17M app_v2.exe

> dq bsdiff app_v1.exe app_v2.exe v1_to_v2.delta
Generating BsDiff delta between
Old file: "app_v1.exe"
New file: "app_v2.exe"

Delta file: "v1_to_v2.delta"
Delta size: 4.28 MB (13.49%)

Apply a binary delta (patch) with BsDiff

dq bspatch <oldfile> <deltafile> <newfile>

Instead of distributing the large app_v2.exe when it's time to upgrade, dq can recreate it by applying the much smaller delta file v1_to_v2.delta to the original app_v1.exe:

> dq bspatch app_v1.exe v1_to_v2.delta generated_app_v2.exe
Applying BsDiff delta between
Old file:   "app_v1.exe"
Delta file: "v1_to_v2.delta"

New file: "generated_app_v2.exe"
> sha256sum app_v2.exe generated_app_v2.exe
fab165a6e604dc7f9265d13013b6fb06319faec4eaa251a8a6d74a7e30e38dc6  app_v2.exe
fab165a6e604dc7f9265d13013b6fb06319faec4eaa251a8a6d74a7e30e38dc6  generated_app_v2.exe

DeltaQ library

The DeltaQ package contains all currently supported delta encoding and suffix sorting providers, for use in your own .NET projects.

Example: bsdiff and bspatch files

using System.IO;
using DeltaQ.BsDiff;
using DeltaQ.SuffixSorting;
using DeltaQ.SuffixSorting.LibDivSufSort;

void MakeDelta() {
    var oldData = File.ReadAllBytes("oldfile.txt");
    var newData = File.ReadAllBytes("newfile.txt");
    using var outStream = File.Create("old_to_new.delta");
    ISuffixSort suffixSorter = new LibDivSufSort();

    Diff.Create(oldData, newData, outStream, suffixSorter);
}

void UseDelta() {
    var oldData = File.ReadAllBytes("oldfile.txt");
    var deltaData = File.ReadAllBytes("old_to_new.delta");
    using var outStream = File.Create("generated_newfile.txt");

    Patch.Apply(oldData, deltaData, outStream);
}

Example: Suffix sorting with LibDivSufSort

using DeltaQ.SuffixSorting;
using DeltaQ.SuffixSorting.LibDivSufSort;

ISuffixSort suffixSorter = new LibDivSufSort();

ReadOnlySpan<byte> text = new byte[] { 1, 2, 3, 4 };
using var ownedSuffixArray = suffixSorter.Sort(text);
ReadOnlySpan<int> sortedSuffixes = ownedSuffixArray.Memory.Span;
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].