Diff v1.1.0 Diff View Source

Functions for performing diffs.

Link to this section Summary

Functions

Applies with patches with supplied annotation (top and tail) This is used to generate visual diffs, etc Shares the same code as patch

Creates a list of changes from the orginal binary to the changed one. Takes the following options

Applies the patches from a previous diff to the given string. Will return the patched version as a list unless a from_list_fn/1 is supplied. This function will takes the patched list as input and outputs the result

Link to this section Functions

Link to this function annotated_patch(original, patches, annotations, from_list_fn \\ fn list -> list end) View Source

Applies with patches with supplied annotation (top and tail) This is used to generate visual diffs, etc Shares the same code as patch

Link to this function diff(original, changed, options \\ []) View Source

Creates a list of changes from the orginal binary to the changed one. Takes the following options:

  • :keep_unchanged - Keeps unchanged binary parts in the returned patches
  • ignore - Takes a regex and ignores matches
Link to this function patch(original, patches, from_list_fn \\ fn list -> list end) View Source

Applies the patches from a previous diff to the given string. Will return the patched version as a list unless a from_list_fn/1 is supplied. This function will takes the patched list as input and outputs the result.