librsync(3)
π librsync β the manual page, but make it slay π
okay bestie, you found librsync(3), which lives in the Library Functions Manual section, and honestly? she's iconic. let's get into it π
β¨ NAME β¨
librsync β the library for delta compression of streams, periodt π¦
πΈ SYNOPSYS πΈ
(not me spelling it SYNOPSYS exactly like the original does β we respect the source material here, no cap π)
#include <stdio.h>
#include <stdlib.h>
#include <librsync.h>
cc ... -lrsync
like, that's the whole vibe check right there. include the headers, link against it, go off β¨
π DESCRIPTION π
so. the librsync library implements network delta-compression of streams and files. yes, streams and files. both. she does both π
the algorithm is similar to the one used in the rsync(1) and xdelta(2) programs, but β and this is the part that matters β she's specialized for transfer of arbitrary-length octet streams. lowkey a whole different beast.
and here's the thing that makes her actually iconic: unlike most diff programs, librsync does not require access to both of the files on the same machine ππ«Ά instead she only needs:
- a short βsignatureβ of the old file, and
- the complete contents of the new file
that's it. that's the whole flex. two machines, one tiny signature, no problem π
π§ The canonical use π§
the canonical use of librsync is in the rproxy(8) reference implementation of the rsync proposed extension to HTTP. very main character energy.
but bestie, she's not gatekept β she may be useful to other programs which wish to do delta-compression in HTTP, or within their own protocol. do your thing β¨
also, there are HTTP-specific utility functions within librsync, but plot twist: they need not be used. optional. take 'em or leave 'em π
and for the terminal girlies: a number of tools such as rdiff(1) provide command-line and scriptable access to rsync functions π₯
π SEE ALSO π
rdiff(1)- rdiff and librsync Manual
http://rproxy.sourceforge.net/orhttp://linuxcare.com.au/rproxy/draft-pool-rsync
iykyk π
π BUGS π
okay bestie, real talk, we gotta be honest here π«Ά
the rsync protocol is still evolving. there may be bugs in the implementation. the interface may change in the future β but it's becoming more stable. growth era, we love to see it β¨
β οΈ also, and this is the spicy part: many routines will panic in case of error rather than returning an error code to the caller. yes fr fr. they just. panic. π
patches to fix this are welcome, but at the current state of development, aborting seems as useful as trusting to possibly-incomplete checking in the client. that's not me being mean, that's literally what the page says π
π AUTHOR π
Martin Pool <mbp@sourcefrog.net>, with Andrew Tridgell <tridge@samba.org>.
also, rdiff development has been supported by Linuxcare, Inc and VA Linux Systems β shoutout to the sponsors, we stan π«Άπ
and that's the whole page, bestie! this cutie comes to you from Martin Pool, dated $Date$, and it's the librsync(3) manual page β go forth and delta-compress something, you absolute icon π¦πβ¨
π¦ where this page comes from
- alpine 3.22: librsync-doc 2.3.4-r1 Β· LGPL-2.1-or-later
- alpine 3.23: librsync-doc 2.3.4-r1 Β· LGPL-2.1-or-later
- alpine 3.24: librsync-doc 2.3.4-r1 Β· LGPL-2.1-or-later
- debian bookworm: librsync-dev 2.3.2-1+b1 Β· LGPL-2.1-or-later
- debian trixie: librsync-dev 2.3.4-1.1+b1 Β· LGPL-2.1-or-later
- epel 10: librsync-devel 2.3.4-5.el10_0 Β· LGPL-2.1-or-later
- epel 9: librsync-devel 2.3.4-1.el9 Β· LGPL-2.1-or-later
- fedora 43: librsync-devel 2.3.4-7.fc43 Β· LGPL-2.1-or-later
- fedora 43: librsync-devel 2.3.4-7.fc43 Β· LGPL-2.1-or-later
- fedora 44: librsync-devel 2.3.4-8.fc44 Β· LGPL-2.1-or-later
- fedora 44: librsync-devel 2.3.4-8.fc44 Β· LGPL-2.1-or-later
- nixpkgs unstable: librsync 2.3.4
- opensuse-leap 16.0: librsync-devel 2.3.4-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: librsync-devel 2.3.4-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: librsync-devel 2.3.4-160000.3.2 Β· LGPL-2.1-or-later
- opensuse-leap 16.0: librsync-devel 2.3.4-160000.3.2 Β· LGPL-2.1-or-later
- ubuntu jammy: librsync-dev 2.3.2-1ubuntu1 Β· LGPL-2.1-or-later
- ubuntu noble: librsync-dev 2.3.4-1.1ubuntu2 Β· LGPL-2.1-or-later
- ubuntu questing: librsync-dev 2.3.4-1.1ubuntu2
- ubuntu resolute: librsync-dev 2.3.4-1.1ubuntu3 Β· LGPL-2.1-or-later
- ubuntu stonking: librsync-dev 2.3.4-1.1ubuntu3 Β· LGPL-2.1-or-later
- Copyright (C) 2000, 2001 by Martin Pool <mbp@sourcefrog.net>
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms