Skip to content

librsync 2.2.0

Compare
Choose a tag to compare
@dbaarda dbaarda released this 12 Oct 04:38
· 282 commits to master since this release
09a287e

Overview

This is a minor release that adds RabinKarp rollsum support as the new recommended default. This is a much better rolling hash with a much better distribution and less collisions, particularly for text files and small blocks. This results in faster delta calculations and a reduced risk of corruption from hash collisions when using small strongsum sizes. It also includes important fixes for compiling on/for windows, and some other minor improvements. Upgrading from v2.1.0 is essential for people compiling for windows, recommended for people who want a performance increase, and otherwise not urgent.

To generate signatures compatible with previous versions of rdiff you will need to use the --rollsum rollsum to select the old rollsum algorithm, or for librsync use the RS_BLAKE2_SIG_MAGIC or RS_MD4_SIG_MAGIC arguments when starting the signature with rs_sig_begin().

Included Changes

  • Bump minor version from 2.1.0 to 2.2.0 to reflect additional RabinKarp rollsum support.

  • Fix MSVC builds by adding missing LIBRSYNC_EXPORT to variables in librsync.h, add -DLIBRSYNC_STATIC_DEFINE to the sumset_test target, and correctly install .dll files in the bin directory. (adsun701, #161)

  • Add RabinKarp rollsum support and make it the default. RabinKarp is a much better rolling hash, which reduces the risk of hash collision corruption and speeds up delta calculations. The rdiff cmd gets a new -R (rollsum|rabinkarp) argument with the default being rabinkarp, Use -R rollsum to generate backwards-compatible signatures. (dbaarda, #3)

  • Use single-byte literal commands for small inserts in deltas. This makes each small insert use 1 less byte in deltas. (dbaarda, #120)

  • Fix multiple warnings (cross-)compiling for windows. (Adsun701, #165, #166)

  • Change rs_file_size() to report -1 instead of 0 for unknown file sizes (not a regular file). (dbaarda #168)

  • Add cmake BUILD_SHARED_LIBS option for static library support. BUILD_SHARED_LIBS defaults to ON, and can be set to OFF using ccmake . to build librsync as a static library. (dbaarda #169)

  • Fix compile errors and add .gitignore entries for MSVS 2019. Fixes hashtable.h to be C99 compliant. (ardovm #170)

Known Issues

  • The debian package configs are still very out of date.

  • There is no documentation on how to compile on or cross-compile for windows. See issues about this on github for help.