{"id":13764053,"url":"https://github.com/monmohan/xferspdy","last_synced_at":"2025-12-24T05:21:07.875Z","repository":{"id":32492874,"uuid":"36073472","full_name":"monmohan/xferspdy","owner":"monmohan","description":"Xferspdy provides binary diff and patch library in golang. [Mentioned in Awesome Go, https://github.com/avelino/awesome-go]","archived":false,"fork":false,"pushed_at":"2021-04-04T09:44:40.000Z","size":51397,"stargazers_count":101,"open_issues_count":3,"forks_count":15,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-11-16T23:32:33.982Z","etag":null,"topics":["diff","fingerprint-generation","golang"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/monmohan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-05-22T13:23:34.000Z","updated_at":"2024-11-06T11:54:58.000Z","dependencies_parsed_at":"2022-09-03T03:33:53.202Z","dependency_job_id":null,"html_url":"https://github.com/monmohan/xferspdy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monmohan%2Fxferspdy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monmohan%2Fxferspdy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monmohan%2Fxferspdy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/monmohan%2Fxferspdy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/monmohan","download_url":"https://codeload.github.com/monmohan/xferspdy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253453326,"owners_count":21911079,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["diff","fingerprint-generation","golang"],"created_at":"2024-08-03T15:01:11.203Z","updated_at":"2025-12-24T05:21:07.860Z","avatar_url":"https://github.com/monmohan.png","language":"Go","funding_links":[],"categories":["Utilities","公用事业公司","工具库","工具库`可以提升效率的通用代码库和工具`","实用工具","Utility","實用工具"],"sub_categories":["Utility/Miscellaneous","HTTP Clients","实用程序/Miscellaneous","Advanced Console UIs","Fail injection","查询语","高级控制台界面","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高級控制台界面","交流"],"readme":"# xferspdy\n\nThis library provides binary diff and patch API in golang. \n\n\n#### Supported today:\n* Command line utilities to diff and patch binary files\n* Library for fingerprint generation, rolling hash and block matching\n* *NEW* : For large files, fingerprint generation automatically switches to parallel mode wherein multiple go routines are used concurrently. For files \u003e 20 MB, there is an improvement of ~50% compared to sequential fingerprint generation. \n\nReference :\n[Rsync Algorithm] (https://rsync.samba.org/tech_report/node2.html)\n\n### Setup\n* Need to have go installed, [golang downloads] (https://golang.org/dl/)\n* Do go get\n\n       `go get github.com/monmohan/xferspdy`\n\n* Install the command line utilities\n\n  Run  `go install ./...` from the _xferspdy_ directory\n\n### Using the API\nSee [GoDoc](https://godoc.org/github.com/monmohan/xferspdy). \nThe docs also contain an example usage of the API.\n \n### Using the fpgen, diff and patch CLI utilities:\nThe library also provides CLI wrappers on API.\n\n#### Example\n* You can see the usage of any of these commands using `$ GOPATH/bin/\u003ccommand\u003e --help`\n\n* Lets say you have a binary file  (e.g. power point presentation _MyPrezVersion1.pptx_).\n\n* First generate a fingerprint of version 1\n\n  `$ GOPATH/bin/fpgen -file \u003cpath\u003e/MyPrezVersion1.pptx`\n  \n  This will generate the fingerprint file _\u003cpath\u003e/MyPrezVersion1.pptx.fingerprint_.\n* Lets say that the file was changed now (for example add a slide or image) and saved as _MyPrezVersion2.pptx_\n* Now Generate a diff (*doesn't require original file*)\n\n   `$ GOPATH/bin/diff -fingerprint \u003cpath\u003e/MyPrezVersion1.pptx.fingerprint -file \u003cpath\u003e/MyPrezVersion2.pptx`\n\n It will create a patch file `\u003cpath\u003e/MyPrezVersion2.pptx.patch`\n\n* Now patch the Version 1 file to get the Version 2\n \n   `$ GOPATH/bin/patch -patch \u003cpath\u003e/MyPrezVersion2.pptx.patch -base \u003cpath\u003e/MyPrezVersion1.pptx`\n\n* This will generate _\u003cpath\u003e/Patched_MyPrezVersion1.pptx_. \n *This file would exactly be same as MyPrezVersion2.pptx.*\n\n*NOTE:* diff and patch are also common utilities present on most distributions so its better to give explicit path to these binaries. for example use _$GOPATH/bin/diff_ and _$GOPATH/bin/patch_\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonmohan%2Fxferspdy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmonmohan%2Fxferspdy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmonmohan%2Fxferspdy/lists"}