$treeview $search $mathjax $extrastylesheet
librsync
2.3.0
$projectbrief
|
$projectbrief
|
$searchbox |
00001 # API Overview {#page_api} 00002 00003 The library supports four basic operations: 00004 00005 -# \b sig: Generating the signature S of a file A . 00006 -# \b loadsig: Read a signature from a file into memory. 00007 -# \b delta: Calculating a delta D from S and a new file B. 00008 -# \b patch: Applying D to A to reconstruct B. 00009 00010 These are all available in three different modes: 00011 00012 - \ref api_whole - for applications that just 00013 want to make and use signatures and deltas on whole files 00014 with a single function call. 00015 00016 - \ref api_streaming - a "push" mode where the caller provides input and 00017 output space, and rs_job_iter() makes as much progress as it can. 00018 00019 - \ref api_pull - a "pull" mode where librsync will call application-provided 00020 callbacks to fill and empty buffers. 00021 00022 Other documentation pages: 00023 00024 - \ref api_trace - aid debugging by showing messages about librsync's state. 00025 - \ref api_callbacks 00026 - \ref api_stats 00027 - \ref api_utility 00028 - \ref versioning 00029 00030 The public interface to librsync is librsync.h, and other headers are internal. 00031 00032 The librsync tree also provides the \ref rdiff command-line tool, which 00033 makes this functionality available to users and scripting languages. 00034 00035 ## Naming conventions 00036 00037 All external symbols have the prefix \c rs_, or 00038 \c RS_ in the case of preprocessor symbols. 00039 (There are some private symbols that currently don't match this, but these 00040 are considered to be bugs.) 00041 00042 Symbols beginning with \c rs__ (double underscore) are private and should 00043 not be called from outside the library. 00044 00045 ## Threaded IO 00046 00047 librsync may be used from threaded programs. librsync does no 00048 synchronization itself. Each job should be guarded by a monitor or used 00049 by only a single thread. 00050 00051 Be careful that the trace functions are safe to call from multiple threads.