Librsync is a library that implements a remote-delta algorithm, which efficiently creates diffs of files separated by a network connection. This allows for greatly reduced network IO to send an updated version of a file that is mostly the same as the previous version.

Case Studies

  • FolderShare used librsync 0.9.7 to transfer files up to 2GB. The code ran on Linux, PC, and OSX without any problems.

Gotchas

  • The larger the file, the larger the amount of memory necessary. It may require a significant amount of memory for gigabyte+ files. This can be mitigated by adjusting the window size.
  • Be sure to test your product with files greater than 2 and 4 GB.

Alternatives

  • If you have a copy of the content that exists on the remote side xdelta can be a more efficient (and less arcane) choice.
  • Another remote syncing algorithm, RDC, is described in this Microsoft Research paper.

Other Resources

 
librsync.txt · Last modified: 2008/04/27 19:06 by twk
 
Except where otherwise noted, content on this wiki is licensed under the following license:CC Attribution-Noncommercial-Share Alike 3.0 Unported
Recent changes RSS feed Donate Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki