[Http-crcsync] General comments on crcsync document

Rusty Russell rusty at rustcorp.com.au
Sun Jan 3 22:59:37 EST 2010


On Wed, 30 Dec 2009 07:29:36 pm Alex Wulms wrote:
> Hi Guys,
> 
> Sorry to come back on this blocksize issue one more time but I finally 
> understand the idea that Toby has implemented and it is a much simpler idea 
> then we had previously.
> 
> The idea is to merge the trailing bytes into the last block.
> 
> Example: we have a file of 40k + 2 bytes file and the wish to use 40 blocks:
> 
> In the old approach, we would have 40 blocks of 1k and a trailing block of 2 
> bytes, leading to 41 hashes in total.
> 
> With the new approach, we would have 39 blocks of 1k and a last block of 1k + 
> 2 bytes.

Yeah, the trailing block stuff bugged me too.  Either one performs the same
when we have an identical match.  But what about the append case?  Perhaps
this is unusual for HTML...

But AFAICT, the simplest spec would be "consider the file to be zero-padded
out to the next block boundary", no?  Then all blocks are regular.

Thanks,
Rusty


More information about the Http-crcsync mailing list