Skip to content

symcloud/librsync_php

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PHP-Bindings for librsync

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.

Install

Requirements:

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

Example

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');