|Evgeniy Khramtsov c2e4b0fff9 Change testing platform: 20.0 -> 20.2||1 month ago|
|c_src||1 year ago|
|doc||1 year ago|
|src||1 year ago|
|test||1 year ago|
|.travis.yml||1 month ago|
|LICENSE||1 year ago|
|Makefile||1 year ago|
|README.md||1 year ago|
|configure||1 year ago|
|configure.ac||1 year ago|
|rebar.config.script||1 year ago|
|vars.config.in||1 year ago|
erlang-rsync is an Erlang wrapper of librsync
library. It provides basic functions for direct file manipulations
delta/2, etc) as well as low-level functions
for fine-grained control (
The low-level interface is somewhat similar to the hashing functions
$ git clone git://github.com/zinid/erlang-rsync.git $ cd erlang-rsync $ ./configure $ make
The whole API documentation is located in the
doc directory and can be built
$ make doc
Let's say we have two files:
remote_file, and we want
to have the content of
We first generate the signature of
local_file. The signature is written in
> rsync:sig("local_file", "sig_file"). ok.
We then generate the delta from
The delta is written in
> rsync:delta("sig_file", "remote_file", "delta_file"). ok.
local_file we reconstruct
result is written in
> rsync:patch("local_file", "delta_file", "new_local_file"). ok.
new_local_file is "equal" to
> file:read_file("new_local_file") == file:read_file("remote_file"). true.
patch_init/1 functions to work the whole content of
the original file should be read into the memory.
This is due to a limitation of librsync API and Erlang's NIF API.
So don't use these functions for extremely large files.