🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #57345

Re: yenc - has anybody else noticed this?

#57345
From: Curt Welch
Date: Mon, 18 Mar 2002 20:45
89 lines
5068 bytes
Nunya Biznis <not@liberty.to.tell> wrote:
> On Mon, 18 Mar 2002 19:07:40 GMT, lordsnow@home.nl (=-lordsnow-=) wrote:
>
> >
> >> With only a single part in hand, I can create the output
> >> file, pre-extend it to the correct size, and insert the
> >> decoded data from the part into it's proper place in the
> >> file.
> >
> >Better would be to use an index file, which keeps track of
> >the byte ranges that have been downloaded. When the whole
> >file has been covered it can then reconstruct it.
> >
> >This prevents diskspace being tied up with what's really
> >'empty' data when you extend a file to it's full size before
> >it's completely downloaded.
> >
>
> I don't think the index file would offer any real economy.
> Such a file would grow to be at least the size of the file
> being downloaded, plus the index overhead.  When you have all
> the parts and are creating the "real" output file, you need
> (briefly) twice the target file size plus the index overhead.
>
> Putting the parts directly into the "real" output file will use
> more space up front, but you never need more space than the size
> of the output file plus the size of one part.

Plus an index file which records the byte ranges of what you have
and don't have.

Most unix systems do not allocate blockes when you seek and write
to the middle of a large file, so with a typical Unix file system,
it wouldn't be as bad to just store the parts in one large file.
Also, if you are collectiong parts as separate files, if the parts
overlap (and you save the overlap), then that's more redudant disk
space to deal with.

Either way, it's really about the same however.

> >> I think Juergen made one mistake, though.  The complete
> >> file CRC is only in the last part.  I would have put it
> >> into the =ybegin line of _every_ part to reduce the chances
> >> of mixing parts that don't really belong to the same file.
> >
> >All parts that belong together would have a common
> >name=<filename> parameter in the =ybegin line.
> >
>
> I was thinking of the possibility that more than one
> version of the same file might be in circulation.  It
> might be unlikely that both versions would have the
> same size, but if they did there would be the risk
> of combining parts that didn't belong together.

Right, the file name doesn't help a lot.  It also means that
if someone reposted the file you wanted but used a different
name, you couldn't use it.  You need a good hash.  CRC + filesize
would probably work nicely.  I had talked about MD5 for this
as well.  MD5 by itself is probably good enough without
having to check the filesize.

Also, for usenet, you need this file hash in the article headers,
not just the ybegin.  Newsreaders need to be able to check
posts to see if they might be part of a file they are looking
for without having to download the body.

> Having the whole-file CRC in every part might also
> simplify handling of the case where multiple unrelated
> files having the same name are being decoded at the same
> time.
>
> yenc will probably work OK the way it is, but I think it
> could be a little more robust if the whole-file CRC was
> carried in every part.

Yeah, but from the side doing the posting that forces the newsreader
to scan the entire file before it can start to post.  For the
huge files that can be a real PITA.

To allow newsreaders to find re-posts correctly, you need a general
Usenet standard for putting this information in the headers and not
just at the top of the body.  This is the FNTP discussion we have tried
to have in news.software.nntp.  It's not going very far.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20020318154507.410$TU@newsreader.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
References: <us1c9ucatbi49fiq685eolg8jf73sjcta0@4ax.com> <3c98344b.1993605@news> <mgfc9uc7d9l0n2tprssu340g22r96uuseu@4ax.com>

Show Full Headers
Complete Article Headers
Message-ID: <20020318154507.410$TU@newsreader.com>
Subject: Re: yenc - has anybody else noticed this?
Date: Mon, 18 Mar 2002 20:45:07 +0000
From: curt@kcwc.com (Curt Welch)
References: <us1c9ucatbi49fiq685eolg8jf73sjcta0@4ax.com> <3c98344b.1993605@news> <mgfc9uc7d9l0n2tprssu340g22r96uuseu@4ax.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!cyclone2.usenetserver.com!usenetserver.com!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: alt.usenet.offline-reader.forte-agent,news.software.nntp
X-Trace: NewsReader.Com 8RCfonGXyDti_4p=ad3Jui2eZgrXERH8MR281zfw8_qs91qD_g
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 88