/python-bps-continued

Fork of python-bps at https://gitlab.com/Screwtapello/python-bps

Primary LanguagePythonDo What The F*ck You Want To Public LicenseWTFPL

Python BPS Toolkit
==================

A toolkit for messing with BPS binary patch files. For more information on the
BPS patch format, see:

    http://byuu.org/programming/bps/


Available Tools
===============

Included in this toolkit are a variety of tools useful to somebody wanting to
use BPS patches, or implementing BPS support on their own.

    bps-disasm FILENAME

	Reads the BPS patch in FILENAME and writes a human-readable
	disassembly of each operation to standard output.

    bps-asm FILENAME

	Reads the BPS patch disassembly in FILENAME (as generated by
	bps-disasm) and writes the binary BPS patch to standard output. You
	probably want to redirect the output to a file.

    bps-validate FILENAME

	Reads the BPS patch in FILENAME and performs a number of checks to
	make sure it's a valid patch. In particular, it checks for things like
	"does the patch try to read past the beginning or end of the source or
	target files" and "does the patch try to write past the end of the
	target file". If it does find a problem, you'll probably want to
	examine the patch contents with bps-disasm.

	If an error is found, a description is printed to standard error and it
	exits with a non-zero exit code. Otherwise, it generates no output.

    bps-graph FILENAME

	Reads the BPS patch in FILENAME and creates a diagram showing how the
	bytes in the target file is encoded. Each byte is represented with
	a single line of output, containing the byte's offset, the operation
	used to encode that particular byte, and the extent of that particular
	operation. For example, here is an excerpt from one particular patch:

	    0000000032 ┐ tR
	    0000000033 │ tR
	    0000000034 │ tR
	    0000000035 ┘ tR

	Here we can see that one TargetRead operation was used to encode the
	values of bytes 32 through 35 inclusive.

	bps-graph is designed to be used with the standard Unix "join" tool, to
	aid in comparing patches produced by different tools.

    bps-optimize FILENAME

	Reads the BPS patch in FILENAME, performs some optimization
	transformations on it, and writes the resulting binary BPS patch to
	standard output.

    bps-apply SOURCEFILE TARGETFILE PATCHFILE

	Reads the source file in SOURCEFILE and applies the patch operations in
	PATCHFILE to produce TARGETFILE.

    bps-diff SOURCEFILE TARGETFILE

	Compares the data in the given files and writes a binary BPS patch
	that will transform SOURCEFILE into TARGETFILE to standard output.

License
=======

See the included COPYING file for details.