All Projects → balacode → go-delta

balacode / go-delta

Licence: MIT license
go-delta - A Go package and utility to generate and apply binary delta updates.

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to go-delta

Ace Diff
A diff/merging wrapper for Ace Editor built on google-diff-match-patch
Stars: ✭ 257 (+928%)
Mutual labels:  diff, diffing
Multidiff
Binary data diffing for multiple objects or streams of data
Stars: ✭ 282 (+1028%)
Mutual labels:  diff, diffing
dipa
dipa makes it easy to efficiently delta encode large Rust data structures.
Stars: ✭ 243 (+872%)
Mutual labels:  diff, delta-compression
Awesome Website Change Monitoring
A curated list of awesome tools for website diffing and change monitoring.
Stars: ✭ 224 (+796%)
Mutual labels:  diff, diffing
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 (+1736%)
Mutual labels:  diff, binary
Pgdiff
Compares the PostgreSQL schema between two databases and generates SQL statements that can be run manually against the second database to make their schemas match.
Stars: ✭ 333 (+1232%)
Mutual labels:  diff, diffing
Differencekit
💻 A fast and flexible O(n) difference algorithm framework for Swift collection.
Stars: ✭ 2,986 (+11844%)
Mutual labels:  diff, diffing
Sirix
SirixDB is a temporal, evolutionary database system, which uses an accumulate only approach. It keeps the full history of each resource. Every commit stores a space-efficient snapshot through structural sharing. It is log-structured and never overwrites data. SirixDB uses a novel page-level versioning approach called sliding snapshot.
Stars: ✭ 638 (+2452%)
Mutual labels:  diff, diffing
Bento
Swift library for building component-based interfaces on top of UITableView and UICollectionView 🍱
Stars: ✭ 371 (+1384%)
Mutual labels:  diff, diffing
Jsondiffpatch
Diff & patch JavaScript objects
Stars: ✭ 3,951 (+15704%)
Mutual labels:  diff, diffing
Diffabledatasources
💾 A library for backporting UITableView/UICollectionViewDiffableDataSource.
Stars: ✭ 601 (+2304%)
Mutual labels:  diff, diffing
Nbdime
Tools for diffing and merging of Jupyter notebooks.
Stars: ✭ 2,135 (+8440%)
Mutual labels:  diff, diffing
Dsladapter
🔥 Kotlin时代的Adapter, Dsl 的形式使用 RecyclerView.Adapter, 支持折叠展开, 树结构,悬停,情感图状态切换, 加载更多, 多类型Item,侧滑菜单等
Stars: ✭ 231 (+824%)
Mutual labels:  diff
extrude
🕵️ Analyse binaries for missing security features, information disclosure and more...
Stars: ✭ 51 (+104%)
Mutual labels:  binary
Diff So Fancy
Good-lookin' diffs. Actually… nah… The best-lookin' diffs. 🎉
Stars: ✭ 14,806 (+59124%)
Mutual labels:  diff
haoide-vscode
haoide-vscode is a vscode extension for salesforce development, which is used to replace haoide
Stars: ✭ 22 (-12%)
Mutual labels:  diff
jomini
Low level, performance oriented parser for save and game files from EU4, CK3, HOI4, Vic3, Imperator, and other PDS titles.
Stars: ✭ 40 (+60%)
Mutual labels:  binary
Listdiff
Swift port of IGListKit's IGListDiff
Stars: ✭ 225 (+800%)
Mutual labels:  diff
Ex audit
Ecto auditing library that transparently tracks changes and can revert them.
Stars: ✭ 214 (+756%)
Mutual labels:  diff
Deck
decK: Configuration management and drift detection for Kong
Stars: ✭ 211 (+744%)
Mutual labels:  diff

go-delta - A Go package and utility to generate and apply binary delta updates.

Go Report Card Build Status Test Coverage Gitter chat godoc License: MIT

Suggestions:

  • Works best on text files, database dumps and any other files with lots of repeating patterns and few changes between updates.

  • Generating deltas of compressed files is not recommended because a small change in the source data can lead to lots of changes in the compressed result, so generating a delta update may give you only minimal size reduction.

  • Don't compress bytes returned by Delta.Bytes() because they are already compressed using ZLib compression.

  • Every delta update adds about 156 bytes for the source and target hashes and various lengths, so it is not recommended for very miniscule updates.

Demonstration:

package main

import (
    "fmt"
    "github.com/balacode/go-delta"
)

func main() {
    fmt.Print("Binary delta update demo:\n\n")

    // The original data (20 bytes):
    var source = []byte("quick brown fox, lazy dog, and five boxing wizards")
    fmt.Print("The original is:", "\n", string(source), "\n\n")

    // The updated data containing the original and new content (82 bytes):
    var target = []byte(
        "The quick brown fox jumps over the lazy dog. " +
        "The five boxing wizards jump quickly.",
    )
    fmt.Print("The update is:", "\n", string(target), "\n\n")

    var dbytes []byte
    {
    	// Use Make() to generate a compressed patch from source and target
    	var d = delta.Make(source, target)
    	
    	// Convert the delta to a slice of bytes (e.g. for writing to a file)
    	dbytes = d.Bytes()
    }

    // Create a Delta from the byte slice
    var d = delta.Load(dbytes)

    // Apply the patch to source to get the target
    // The size of the patch is much shorter than target.
    var target2, err = d.Apply(source)
    if err != nil {
        fmt.Println(err)
    }
    fmt.Print("Patched:", "\n", string(target2), "\n\n")
} //                                                                        main
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].