\label{api_stats_md_doc_stats}%
\Hypertarget{api_stats_md_doc_stats}%
 Encoding and decoding routines accumulate compression performance statistics, such as the number of bytes read and written, indicators a \mbox{\hyperlink{librsync_8h_a576eccd11a2696cb46140d5e43c83d7e}{rs\+\_\+stats\+\_\+t}} structure. ~\newline


The particular statistics collected depend on the type of job.

Stats may be converted to human-\/readable form or written to the log file using \mbox{\hyperlink{librsync_8h_af35648a6cd1fff934021114802bbb303}{rs\+\_\+format\+\_\+stats()}} or \mbox{\hyperlink{librsync_8h_ad7216989717e18b89c82509a01d9ae03}{rs\+\_\+log\+\_\+stats()}} respectively.

Statistics are held in a structure referenced by the job object. The statistics are kept up-\/to-\/date as the job runs and so can be used for progress indicators.

\mbox{\hyperlink{librsync_8h_ae0051eed681361b1637191d99c1b744d}{rs\+\_\+job\+\_\+statistics}} returns a pointer to statistics for the job. The pointer is valid throughout the life of the job, until the job is freed. The statistics are updated during processing and can be used to measure progress.

Whole-\/file functions write statistics into a structure supplied by the caller. {\ttfamily NULL} may be passed as the {\ttfamily stats} pointer if you don\textquotesingle{}t want the stats. 