🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #56533

Re: [yenc] yydecode -- reimplementation of decoder

#56533
From: Liyang Hu
Date: Sat, 16 Feb 2002 00:50
44 lines
2894 bytes
Yume no Hikari <hikari@nevermind.where> wrote:
> On Thu, 14 Feb 2002 22:37:08 -0700, Liyang Hu wrote:
>> http://nerv.cx/liyang/download/yydecode/
>> So far, (somewhat over two hours of work), there's no CRC
>> checking -- I'll add that in a day or two after I get some sleep

I've had some sleep, and CRC-32 checking's implemented now. ^_^ I'll
post it up in the usual place after I tidy up a few more things.

> Hallelujah.  A more graceful solution to the pipe-able yDec than I
> managed (mine was a nasty hack of the already-scary example code).

IMHO the example code was riddled with GOTOs, which is readability
hell enough, compounded by it making multiple passes through the
input so the parts get decoded in order, which is not necessary. Any
decent OS will let you lseek(2) past the end of file, and fill up[1]
the space inbetween with zeroes.

> Now I just need to convince myself to crack open the libyenc I had
> half-done, so we might have encoding and/or built-in decoding
> support some time this year. 

Built into what? O_o

> (I just hate having to switch to tin to download yEnc binaries
> just 'cos Pan won't save as a raw file and has no concept of
> piping articles.)

I've used ubh[0] quite successfully for downloading binaries for
quite a while now ... Have you heard of / tried it? It works best in
conjunction with a newsreader -- as in, you give it a regex of
subjects to match, and it will download those articles, combining
the parts in the process. It even has support for external article
decoding, so you can just plug yydecode into it, et voila! ^_^

mata ne,
/Liyang
[0] http://ubh.sf.net/
[1] Minor lie: holes.
-- 
.--| Liyang HU |--| http://nerv.cx/ |--| Caius@Cam |--| ICQ: 39391385 |--.
|  Well, we just happen to *have* an infinite number of monkeys!         |
|           http://stats.distributed.net/rc5-64/psummary.php3?id=284324  |
Technical Details
Message-ID: <a4kac8$ou1$1@pegasus.csx.cam.ac.uk>
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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail
References: <a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <pan.2002.02.15.02.32.05.906913.25363@nevermind.where>

Show Full Headers
Complete Article Headers
Message-ID: <a4kac8$ou1$1@pegasus.csx.cam.ac.uk>
Subject: Re: [yenc] yydecode -- reimplementation of decoder
Date: Sat, 16 Feb 2002 00:50:16 +0000
From: Liyang Hu <newsgroups@nerv.cx>
References: <a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <pan.2002.02.15.02.32.05.906913.25363@nevermind.where>
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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!server1.netnews.ja.net!pegasus.csx.cam.ac.uk!not-for-mail
Newsgroups: news.software.nntp
Organization: University of Cambridge, England
Lines: 43
Sender: Liyang Hu <lh259@portal.acad.cai.cam.ac.uk>
NNTP-Posting-Host: portal.acad.cai.cam.ac.uk
User-Agent: tin/1.5.8-20010221 ("Blue Water") (UNIX) (Linux/2.4.17-xfs+lvm10+intl (i686))