BSDiff patch files
BSDiff is a general-purpose binary patch format identified by the magic bytes `BSDIFF40`. It stores three bzip2-compressed blocks describing how to rebuild the target from the source. It is used more widely for software updates than for romhacks, but it turns up occasionally as a .bdf file.
- Extension
- .bdf, .bsdiff, .bspatch
- Identifier bytes
- BSDIFF40
- Verifies your ROM
- No
- Can change ROM size
- Yes
- Create on this site
- Apply only
- Common on
- Assorted romhacks, Software updates
Limitations
- Apply only on this site.
- No embedded ROM checksum.
How BSDiff works
A BSDiff patch holds three compressed streams: a control block of instructions, a diff block of byte-level corrections applied to copied data, and an extra block of literal insertions. The combination handles binaries where code has shifted but stayed largely similar, which is exactly what a recompiled program looks like.
The format carries no checksum for the source file, so like IPS it will apply to the wrong input without complaint.
Applying a .bdf patch
Frequently asked questions
What is a .bdf file?
A BSDiff binary patch. The extension varies between .bdf, .bsdiff and .bspatch, but the contents are the same format, identified by the leading bytes BSDIFF40.
Can I create a BSDiff patch here?
No, only apply one. For creating patches on this site, use BPS, IPS, UPS, APS, RUP, PPF or EBP.