Skip to content

Commit

Permalink
README: add usage example
Browse files Browse the repository at this point in the history
  • Loading branch information
StefanKarpinski committed Jun 18, 2020
1 parent 3a45eb9 commit 71c7f6c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,30 @@ different new files.

<!-- END: copied from inline doc strings -->

## Usage Example

```julia
julia> cd(mktempdir())

julia> open("goodbye.txt", write=true) do io
println(io, "Goodbye, world.")
end

julia> open("hello.txt", write=true) do io
println(io, "Hello, world!")
end

julia> using BSDiff

julia> patch = bsdiff("goodbye.txt", "hello.txt");

julia> bspatch("goodbye.txt", "hello_copy.txt", patch)
"hello_copy.txt"

julia> read(ans, String)
"Hello, world!\n"
```

## Reproducibility

Even though this package produces patch files that are compatible with the
Expand Down

0 comments on commit 71c7f6c

Please sign in to comment.