Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #3978
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!zen.net.uk!dedekind.zen.co.uk!reader02.nrc01.news.zen.net.uk.POSTED!not-for-mail |
|---|---|
| From | Nobody <nobody@nowhere.com> |
| Subject | Re: Detecting differences |
| Date | Sun, 27 Oct 2013 10:52:10 +0000 |
| User-Agent | Pan/0.14.2 (This is not a psychotic episode. It's a cleansing moment of clarity.) |
| Message-Id | <pan.2013.10.27.10.52.21.130000@nowhere.com> |
| Newsgroups | comp.programming |
| References | <526cdff8$0$23114$4fafbaef@reader2.news.tin.it> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 26 |
| Organization | Zen Internet |
| NNTP-Posting-Host | 14ea5a16.news.zen.co.uk |
| X-Trace | DXC=1iVAm:;`jGITHJl0YRfECG]G;bfYi23hD=dR0\ckLKG@WeZ<[7LZNRFM@@mUWndclLM2Z^cWRFGAKdKl7_ndnF9@ |
| X-Complaints-To | abuse@zen.co.uk |
| Xref | csiph.com comp.programming:3978 |
Show key headers only | View raw
On Sun, 27 Oct 2013 10:42:15 +0100, Giuliano Bertoletti wrote: > Does it makes sense? Is there a cleverer way? rsync uses a single level; it selects a block size based upon the size of the file, then sends a list of hashes, one for each block. Any block with a hash mismatch is sent in its entirety. If you want to use multiple levels, the higher-level hashes should be calculated over the lower-level hashes rather than over the data. The optimum number of levels depends upon the probability of a difference. If differences are rare, then more levels will be more efficient. For a single difference, the asymptotically-optimal branching order is 3. If it wasn't constrained to be an integer, it would be e = 2.71828... (the value at which x/log(x) is a minimum). As differences become more common, you may as well skip the first few levels, as larger blocks will almost always have at least one difference. In short, there's no point in sending higher-level hashes which are likely to result in a mismatch. If differences are extremely common, then you'll end up sending the entire file anyhow and there's no point in sending any hashes.
Back to comp.programming | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Detecting differences Giuliano Bertoletti <gbe32241@libero.it> - 2013-10-27 10:42 +0100 Re: Detecting differences Nobody <nobody@nowhere.com> - 2013-10-27 10:52 +0000 Re: Detecting differences malcolm.mclean5@btinternet.com - 2013-10-27 12:22 -0700
csiph-web