I'm looking for a way to use this in C to both create and apply patches. Can the C library do that, or can it only apply previously created patches?