This is a python wrapper of the original C implementation. (Source code from Fossil-2.6)
Fossil achieves efficient storage and low-bandwidth synchronization through the use of delta-compression. Instead of storing or transmitting the complete content of an artifact, fossil stores or transmits only the changes relative to a related artifact.
Other implementations:
pip install python-fossil-delta
import fossil_delta
def main():
delta = fossil_delta.create_delta(b'abc', b'abcdef')
out = fossil_delta.apply_delta(b'abc', delta)
print(out) # --> abcdef