On Sun, Sep 08, 2002 at 04:08:55PM -0500, Edgar Friendly wrote:
> Robert Bihlmeyer <robbe at debian.org> writes:
> 
> > Hi,
> > 
> > is there a way to get at the size of a splitfile's blocks before
> > successfully fetching one block? I'm trying to snarf a number of
> > blocks simultanously, immediately dropping them into their right
> > positions in the same destination file (rather than into a number of
> > temp files). This is only possible if I know their sizes beforehand.
> > 
> > If there's no such data right now, it would be nice to add this to the
> > splitfile metadata. It's much more useful than the total file size
> > which is in there.
> > 
> > -- 
> > Robbe
> 
> It's a pretty safe assumption that splitfile blocks will be a power of
> 2 bytes in size.  from that, just take the whole filesize and divide
> by the number of blocks and round up.
> 
Hmm. If I remember correctly, it is possible to parse the CHK key
without having the data, and tell approximately how big it is from
that... If we require that all but the last chunk are full, then this
gives you your filesize (CHKs are power of two sizes, plus some
metadata/fields stuff).
> Thelema
> -- 
> E-mail: thelema314 at bigfoot.com                        Raabu and Piisu
> GPG 1024D/36352AAB fpr:756D F615 B4F3 BFFC 02C7  84B7 D8D7 6ECE 3635 2AAB
> 
> _______________________________________________
> devl mailing list
> devl at freenetproject.org
> http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl
> 

-- 
Matthew Toseland
toad at amphibian.dyndns.org
amphibian at users.sourceforge.net
Freenet/Coldstore open source hacker.
Employed full time by Freenet Project Inc. from 11/9/02 to 11/11/02.
http://freenetproject.org/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: 
<https://emu.freenetproject.org/pipermail/devl/attachments/20021019/133a389c/attachment.pgp>

Reply via email to