🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #62668

Re: xBin and PARity files

#62668
From: Kjetil Torgrim Homme
Date: Thu, 02 Jan 2003 11:45
75 lines
4497 bytes
[Curt Welch]:
>
>   Right, if a par file covers 100 articles, and we try to include
>   "the correct hash" for each individual aritcle, there are two
>   different ways to do that.  I'm not sure which you are talking
>   about.

I suggest to include all the _leaves_, the hash of every xBin block
covered.  no tree information at all.

>   Well, I wasn't talking about the the added size, I was talking
>   about how it wouldn't help the download tool make better
>   decidsions about which par articles to download.  So you are
>   forced to download all the same articles with or without that
>   data.

yes, that's a bummer, but I don't see any way of fixing that.

>   Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no> wrote:
>   > yes it would, by an order of 20 or more (the number of blocks in
>   > a part).  if you have five PAR files, and need three of them,
>   > you'll need to try a lot of combinations before finding out
>   > which two are fake.  there are ten possible picks (5!/2!3!),
>   > only one is correct.  in most systems it will probably give a
>   > better speedup than 20, due to caching effects.
>   
>   But how does the extra hash data help you search those 10 picks
>   faster?

first, you verify that the leaf hashes included in the PAR files fit
into your tree constructed from the normal articles.  then you
reconstruct the first missing block.  compute its hash, see if it
matches.  if it doesn't, one (or more) of the PAR files was bogus, try
a different pick.

the win is that you only have to process _one_ block, rather than all
the twenty blocks in the file, before you can smell a rat.

(if two parts are missing, I guess you'll have to reconstruct two
blocks, but on the other hand you'd have to do forty blocks before
being able to verify the data otherwise, so the ratio is the same.)

>   On the time issue, for example, as long as you have to scan all
>   the other articles in the PAR set as you reconstruct a missing
>   article, is it possible and resonaoble to reconstruct all missing
>   articles at the same time?  I suspect that the answer is yes.
>   That not only can you, but that it is by far the most resonable
>   way to do it, because once you have all the data you need to do
>   the math to find the answer for one file, you have the answer for
>   the other missing files at the same time.  So being able to spot
>   that the first reconstructed file by itself is bogus saves very
>   little time since after only a little more work, you have all the
>   parts and can easially compute and verify the file hash.

that's the way I imagine it must work as well.

>   > I don't think uudecode is clever enough to create the directory
>   > if needed.
>   
>   But will it cause chaos and core dumps, or will some be smart
>   enought to just use the part of the file name after the / or what?

on Unix, you'll get a ENOENT from open since the directory doesn't
exist.

  $ head -2 testinf 
  begin 644 uggabugga/foo.avi
  M(R`N8F%S:')C"@HC(%5S97(@<W!E8VEF:6,@86QI87-E<R!A;F0@9G5N8W1I
  $ uudecode testinf
  uudecode: uggabugga/foo.avi: testinf: No such file or directory

-- 
Kjetil T.			|  read and make up your own mind
				|  http://www.cactus48.com/truth.html
Technical Details
Message-ID: <1rptrflqrl.fsf@ellifu.ifi.uio.no>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail
References: <20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <1r7kdr2id0.fsf@vingodur.ifi.uio.no> <20021231140408.995$iu@newsreader.com> <1rlm24a74r.fsf@thrir.ifi.uio.no> <20030101222332.694$bV@newsreader.com>

Show Full Headers
Complete Article Headers
Message-ID: <1rptrflqrl.fsf@ellifu.ifi.uio.no>
Subject: Re: xBin and PARity files
Date: Thu, 02 Jan 2003 11:45:02 +0000
From: Kjetil Torgrim Homme <kjetilho@haey.ifi.uio.no>
References: <20021230133312.202$K5@newsreader.com> <20021230171837.399$Im@newsreader.com> <1r7kdr2id0.fsf@vingodur.ifi.uio.no> <20021231140408.995$iu@newsreader.com> <1rlm24a74r.fsf@thrir.ifi.uio.no> <20030101222332.694$bV@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!logbridge.uoregon.edu!newsfeed.vmunix.org!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail
Newsgroups: news.software.nntp
Organization: Dept. of Informatics, Univ. of Oslo, Norway
Lines: 74
NNTP-Posting-Host: ellifu.ifi.uio.no
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
X-Trace: maud.ifi.uio.no 1041507903 27173 129.240.65.211 (2 Jan 2003 11:45:03 GMT)
X-Complaints-To: abuse@ifi.uio.no
NNTP-Posting-Date: 2 Jan 2003 11:45:03 GMT
User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7