Categorygithub.com/Maicarons/bsdiffup
repository
0.0.0-20230904121505-a63f05cc575a
Repository: https://github.com/maicarons/bsdiffup.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# README

bsdiffup

bsdiffup - BSDiff Update Tool

GitHub license GitHub go.mod Go version GitHub tag (latest SemVer) GoDoc Go Report Card

Package

  • Client - compare,unzip
  • cmd - test
  • Server - compare,zip,upload
  • Go package

Usage

	goDiff, err := diff.GoDiff("./testdir/dir1", "./testdir/dir2")
	if err != nil {
		log.Fatal(err)
		return
	}
	fmt.Println(goDiff)

ZIP file Format

{FileName}_{Semver}.zip
e.g. update_1.2.0.zip | exampleFile_1.2.3-alpha.1+build123.zip

Path
-.
-..
-diff.json
-VERSION
-other files

diff.json Format

[
  {
    "path":"good\\apple.html",
    "type":"deleted",
    "md5":"6620d7be0e9e40f4bd3c0a5a86590ecf"
  },
  {
    "path":"good\\food.bin",
    "type":"modified",
    "md5":"d41d8cd98f00b204e9800998ecf8427e"
  },
  {
    "path":"img.bmp",
    "type":"modified",
    "md5":"9f7c76cbd9a189856db543a95654d5c5"
  },
  {
    "path":"main.py",
    "type":"added",
    "md5":"a53826cc458d6ba62653e9d66f23d4e9"
  }
]

VERSION Format

1.2.3-alpha.1+build123