Re: How to work out the final decision function?
Brought to you by:
thesun
From: Shachar S. <sh...@sh...> - 2011-07-15 07:21:27
|
On 15/07/11 08:36, 阮巧海 wrote: > Hi: > > There are two decision functions. > The one in gzip triggers if the sum of the past 4096 bytes divides > (plain text) by 4096 with zero remainder. > The another one in rsyncrypto triggers if the sum of the past 256 > bytes divides (compressed plain text) by 8192 with zero remainder. Of > course, the block size must be 8192 bytes at least. > > But the homepage explains that finally the performance for the > decision function is that it triggers if the sum of the past 8196 > bytes divides by 4096 with zero remainder. > Can you tell me how to work out the final decision function? > Or you get the final decision function first, and then extend it to > gzip and rsyncrypto? No (not yet?) At its current implementation, rsyncrypto encapsulates two passes over the data. The first is the compression stage, and it takes place using the stock installed gzip with the --rsyncable flag. At this point, whatever decision function gzip implements gets used over the plain text to reset the compression history. The second stage is the encryption. At this stage, the compressed data is used in order to trigger the decision function inside rsyncrypto. Rsyncrypto has flags to tweek the precise decision function (the roll-win, roll-min and roll-sensitivity parameters), but the defaults, indeed, are not identical to those used by gzip. There are some future plans to not use the gzip executable, but rather to use zlib, and only have one decision function reset both encryption and compression parameters. At this point in time, I cannot tell you when, or even if, they will ever take place. Shachar > > Thanks. -- Shachar Shemesh Lingnu Open Source Consulting Ltd. http://www.lingnu.com |