zsync 0.6.6
===========

zsync is a file transfer program. It allows you to download a file from a
remote web server, where you have a copy of an older version of the file on
your computer already. zsync downloads only the new parts of the file. It uses
the same algorithm as rsync.

zsync does not require any special server software or a shell account on the
remote system (rsync, in comparison, requires that you have an rsh or ssh
account, or that the remote system runs rsyncd). Instead, it needs a control
file - a .zsync file - that describes the file to be downloaded and enables
zsync to work out which blocks it needs. This file can be created by the site
hosting the download, and placed alongside the file to download - it is
generated once, then any downloaders with zsync can use it. Alternatively,
anyone can download the file, make a .zsync and provide it to other users.

http://zsync.moria.org.uk/

Installation
------------

See the file INSTALL for instructions on compiling and (optionally) installing
zsync.

zsync does not need to be installed - it has no data files or libraries. So
it can be run from this directory where you compile it. The man(1) program on
some systems will let you read the man pages without installing them, e.g.
man -l doc/zsync.1 .

zsync is free software. There is no implied support, no implied fitness for
purpose, no warranty. You use it at your own risk.

Use
---

In its simplest form, as an end-user:

zsync http://some.example.com/downloads/my-big-download.tar.zsync

Someone has to make a .zsync file for the download before you can use zsync;
typically the site providing a file download will either include a link
alongside  the download to the .zsync file as well, or the .zsync will appear
in the same directory as the download.

And you have to have an older copy of the file around, otherwise there is
little point in using zsync - zsync normally looks in the current directory for
a file of the same name as the one being downloaded.
If the local file is not in the current directory or has a different
name, you can specify it with -i.

Offering zsync downloads
------------------------

Simple example:
Suppose you have http://example.com/dl/some-image-0.2.iso ; which is in
/var/www/downloads/ on your server.

cd /var/www/downloads/
zsyncmake some-image-0.2.iso

This creates some-image-0.2.iso.zsync in the same directory. You should keep the
files together. A .zsync file does not replace the original download file;
zsync merely allows users to save time by only downloading the parts of the
file that they do not already have.

A user with v0.1 of the same file can now use zsync to download only the new
bits.

zsync -i some-image-0.1.iso http://example.com/dl/some-image-0.2.iso.zsync

Copyright, Author, Acknowledgements
-----------------------------------

zsync is based on the rsync algorithm, by Andrew Tridgell. It also incorporates
a number of optimisations, based on ideas in academic papers by Utku Irmak,
Svilen Mihaylov and Torsten Suel (primarily "Improved Single-Round Protocols
for Remote File Synchronization", Sept 2004).

zsync uses a large part of zlib - this code, in the zlib subdirectory, is
copyright 1995-2003 Jean-loup Gailly and Mark Adler, see zlib/README for
details. This code contains local changes by me that are not compatible with
and not available in standard zlib; see zlib/README.zsync for an explanation.

zsync includes an implementation of getaddrinfo by Motoyuki Kasahara. See
getaddrinfo.c for the license, it's a BSD-style license; but normally zsync
compiles against the getaddrinfo() in the system libc, so this code is not
normally used.

zsync uses OpenSSL (libcrypto) for MD4 and SHA-1 hashing.

The rest of the code (that is, everything not in the zlib subdirectory) is
Copyright (C) 2004,2005,2007,2009,2025,2026 Colin Phipps <cph@moria.org.uk>.
zsync is made available under the (clarified) Artistic License - see the file
COPYING for details.

Thanks also to:

* Dennis Schridde, for contributing patches to improve portability.
* Timothy Lee, for finding bugs and supplying patches.
* Richard Kiss, for supplying a patch for MacOS X compilation.

I must thank the developers above, whose code I have used. Also, I would like
to thank the Free Software Foundation and its contributors, for gcc, gdb and
emacs, the essential development tools. Also I would thank Sourceforge for
providing the hosting facilities for the downloads and mailing list, and the
compile farm for testing portability.

Also, thanks to Érsek László, James Montgomerie, James Antill,
saul@alien-science.org, Kent Mein, Marc Lehmann, Robert Lemmen, Mark Adler,
Ricardo Correia, Karl Kalleberg, Michael Stone, Richard Lucassen, Duncan
Mac-Vicar, Jari Aalto, Marcin Mirosław, Jan Varho, Loïc Minier, Gian Merlino
and S Page for useful feedback and bug reports for previous versions.

