patch(1) on FreeBSD does not support null bytes. With GNU diff/patch I could handle multiple files containing null bytes with one patch, but xxd (which handles null bytes) does not seem to support this. How can I generate something similar to unified diff's with the native FreeBSD toolchain?
The "native FreeBSD toolchain", i.e., the base system is rather limited. You could use the ports for GNU diff/patch, or alternatively
bsdiff also is a possibility.
However, unified diffs (as the comments suggest) are specifically for text files because they are a specific format in terms of lines.
Xdelta provides the ability to generate deltas between a pair of files and later apply those deltas. It operates similar to the diff and patch commands, but works on binary files and does not produce a human readable output.
- Binary diff/patch utility (alternative to
xdelta), reportedly "incorporated into base system" long before 2009. See manual page.