[Http-crcsync] General comments on crcsync document

Toby Collett tcollett+lists at plan9.net.nz
Mon Nov 2 08:37:30 EST 2009


If we use last_block_size = file % block_count the final block will have a
maximum size of block_count, so if we have 40 blocks for 39k + 2 byte file
then we have 39 1k blocks and a trailing block of size 2 bytes. Another
option is simply to drop the trailing blocks and they will always be
returned as a literal.

Feel free to correct my maths if I am missing something...

Toby

2009/11/2 Rusty Russell <rusty at rustcorp.com.au>

> On Thu, 29 Oct 2009 06:11:53 am Toby Collett wrote:
> > The current version in git now implements the standard document
> completely
> > as far as I am aware (doc is available from git
> >
> http://repo.or.cz/w/httpd-crcsyncproxy.git?a=tree;f=crccache/doc;h=37d90acd37bb0199a37e6d6a779c37c4f37da29b;hb=HEAD
> )
> >
> > So now we need some testing, not sure the best way to do this, Martin, do
> > you want to set up access to a server?
> >
> > Rusty: There was an assertion that tailsize be < block-size in the crc
> code.
> > The latest version has tail_size = blocksize + remainder. It seems to
> work
> > when that assertion is removed and I couldnt see any reason why it can't
> be
> > greater in the current implementation. Could you confirm?
>
> There's no real reason, but it seems wrong.  if tailsize > blocksize, why
> isn't there simply one more block?
>
> Cheers,
> Rusty (who hasn't really been paying any attention)
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.laptop.org/pipermail/http-crcsync/attachments/20091102/eb82ca85/attachment.htm 


More information about the Http-crcsync mailing list