Skip to content

a utility for generating binary patches that can be used to reconstruct a modified version of a file without directly distributing that modification

License

Notifications You must be signed in to change notification settings

jbritain/patchbin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 

Repository files navigation

patchbin

patchbin is a small web utility which allows for binary patching of files. it is written in vanilla JavaScript and HTML, because I wanted it to run on the client side (to prevent me from needing to host it and clog up my web server).

what is it for?

I built patchbin not for myself, but for other members of the Minecraft shader development community who are unable to distribute their work due to it being built upon works with restrictive licenses. I completely respect the original developers of those shaderpacks for their licensing decisions, and this is a way to honour that license, as the end user must download the original shaderpack from the original source before patching it.

how does it work?

the algorithm is very simple - the unmodified file is truncated or padded so that it matches the length of the modified version. the two are then XORed together, producing the patch file. XORing this against the original unmodified file will then reconstruct the modified version.

limitations

one major limitation is that the exact same file must be patched every time. for zip archives, this can potentially be problematic if the archives were generated by some other tool, as the metadata of the files in the archive will be different. this sounds like a pretty niche issue to have, but you'd be surprised

About

a utility for generating binary patches that can be used to reconstruct a modified version of a file without directly distributing that modification

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published