\label{page_librsync_md_doc_librsync}%
\Hypertarget{page_librsync_md_doc_librsync}%
 The library supports four basic operations\+:


\begin{DoxyEnumerate}
\item {\bfseries{sig\+:}} Generating the signature S of a file A .
\item {\bfseries{loadsig\+:}} Read a signature from a file into memory.
\item {\bfseries{delta\+:}} Calculating a delta D from S and a new file B.
\item {\bfseries{patch\+:}} Applying D to A to reconstruct B.
\end{DoxyEnumerate}

These are all available in three different modes\+:


\begin{DoxyItemize}
\item \mbox{\hyperlink{api_whole}{Whole-\/file API}} -\/ for applications that just want to make and use signatures and deltas on whole files with a single function call.
\item \mbox{\hyperlink{api_streaming}{Streaming API}} -\/ a \char`\"{}push\char`\"{} mode where the caller provides input and output space, and \mbox{\hyperlink{librsync_8h_aede8e0f42424b9aa29093f94b59ea029}{rs\+\_\+job\+\_\+iter()}} makes as much progress as it can.
\item \mbox{\hyperlink{api_pull}{Pull API}} -\/ a \char`\"{}pull\char`\"{} mode where librsync will call application-\/provided callbacks to fill and empty buffers.
\end{DoxyItemize}

Other documentation pages\+:


\begin{DoxyItemize}
\item \mbox{\hyperlink{api_trace}{Trace output}} -\/ aid debugging by showing messages about librsync\textquotesingle{}s state.
\item \mbox{\hyperlink{api_callbacks}{IO callbacks}}
\item \mbox{\hyperlink{api_stats}{Stats}}
\item \mbox{\hyperlink{api_utilities}{Utility functions}}
\item \mbox{\hyperlink{page_versioning}{Versioning}}
\end{DoxyItemize}

The public interface to librsync is \mbox{\hyperlink{librsync_8h}{librsync.\+h}}, and other headers are internal.

The librsync tree also provides the \mbox{\hyperlink{page_rdiff}{rdiff command}}, which makes this functionality available to users and scripting languages.\hypertarget{page_librsync_autotoc_md65}{}\doxysubsection{Naming conventions}\label{page_librsync_autotoc_md65}
All external symbols have the prefix {\ttfamily rs\+\_\+}, or {\ttfamily RS\+\_\+} in the case of preprocessor symbols. (There are some private symbols that currently don\textquotesingle{}t match this, but these are considered to be bugs.)

Symbols beginning with {\ttfamily rs\+\_\+\+\_\+} (double underscore) are private and should not be called from outside the library.\hypertarget{page_librsync_autotoc_md66}{}\doxysubsection{Threaded IO}\label{page_librsync_autotoc_md66}
librsync may be used from threaded programs. librsync does no synchronization itself. Each job should be guarded by a monitor or used by only a single thread.

Be careful that the trace functions are safe to call from multiple threads. 