This php extension provides a binding to the librsync C-library. This library is a open-source implementation of the rsync remote-delta algorithm.
This algorithm is using a rolling check-sum and a md4 check-sum for blocks of the file to generate a signature file. The signature file is used to generate a diff from the file on the remote site. This diff can be used on the local site to patch the file.
Requirements:
- PHP-CPP
- PHP5
- librsync
- make
- g++
Steps:
After clone edit Makefile
to match your PHP installation (especially INI_DIR).
git clone [email protected]:symcloud/librsync_php.git
cd librsync_php
make
sudo make install
rs_sig_file('test/test-a.txt', 'test/test-a.sig');
rs_delta_file('test/test-a.sig', 'test/test-b.txt', 'test/test-a.delta');
rs_patch_file('test/test-a.txt', 'test/test-a.delta', 'test/test-a-new.txt');