Skip to content

An binary diff&patch library based on bsdiff algorithm(v4.3) for Go

License

Notifications You must be signed in to change notification settings

tsyeyuanfeng/go-bsdp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-bsdp

An binary diff&patch library based on bsdiff algorithm(v4.3) for Go

Installation

go get -v github.com/tsyeyuanfeng/go-bsdp/...

API

package main

import (
    "os"
    "github.com/tsyeyuanfeng/go-bsdp/bsdp"
)

const (
    oldFilePath = "your old file path"
    newFilePath = "your new file path"
    patchFilePath = "your patch file path"
)

func main() {
    // Generate patch
    bsdp.Diff(oldFilePath, newFilePath, patchFilePath)

    // Apply patch
    bsdp.patch(oldFilePath, newFilePath, patchFilePath)
}

Command line tool

# Generate patch
go-bsdp diff "old file" "new file" "patch file"

# Apply patch
go-bsdp patch "old file" "new file" "patch file"

About

An binary diff&patch library based on bsdiff algorithm(v4.3) for Go

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published