🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #56564

Re: [yenc] yydecode -- reimplementation of decoder

#56564
From: Neeber
Date: Sat, 16 Feb 2002 19:38
59 lines
3033 bytes
On 16 Feb 2002 09:29:41 +0100, archiver@i3w.com (The Archiver) wrote:

>Liyang Hu <newsgroups@nerv.cx> wrote:
>
>>After hurting[0] my eyes[1] trying to read the example code given on
>>http://www.yenc.org/ , I decided I would stop whinging and do
>>something about it. So here it is:
>>
>>    http://nerv.cx/liyang/download/yydecode/
>
>Thanks for the notification. I'll add it to yenc.org soon.
>
>In the last two weeks I've been notified about some UNIX/LINUX
>decoders/examples - and one of my friends did also write a 
>better code for UNIX.
>
>>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 personally believe that CRC checking is very important.
>There have been some posting programs which create wrongly
>formatted yEnc messages.

Speaking of which, I've toyed recently with the idea of creating a
test suite of broken and corrupt yEnc-encoded files, so developers
have a way of testing any decoder client they produce. Nothing
hardcore (this doesn't replace automated testing), but t would be a
positive step in uniform error handling (something not evident in any
yEnc decoder I've yet met).

I can reasonably see a relatively short list of 'cases' to punish the
unaware decoder (can't think of anything that can punish an encoder).

All encodes.
	Missing header
	Missing trailer
	Missing header/trailer entities
	Corrupt header/trailer entities (i.e. illegal characters)
	Incorrect header/trailer entities (i.e. wrong CRC, line
length, file size)

Multipart encodes:
	Missing part
	Duplicated part
	Same .ntx, multiple parts for same file
	Same .ntx, multiple parts for different files
	Overlapping parts

I'm going to go ahead and create these, using small files (.txt) for
starters. Creating corrupt, larger files (.mp3, .mpeg) will take
longer, and will probably only test performance and memory issues, so
I'm putting that off for later.

Can anyone think of any cases I've missed? Most of the multipart cases
are intended to test specific client behavior, while the general cases
test spec compliance.

Cheers
Technical Details
Message-ID: <0vct6ugbfkb43j1p6168m37qoml0ahtej9@4ax.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!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sunqbc.risq.qc.ca!novia!novia!sequencer.newscene.com!not-for-mail
References: <a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <41299.g22205@archiver.winews.net>

Show Full Headers
Complete Article Headers
Message-ID: <0vct6ugbfkb43j1p6168m37qoml0ahtej9@4ax.com>
Subject: Re: [yenc] yydecode -- reimplementation of decoder
Date: Sat, 16 Feb 2002 19:38:11 +0000
From: Neeber <a110y2@hotmail.com>
References: <a4i6q4$kr8$1@pegasus.csx.cam.ac.uk> <41299.g22205@archiver.winews.net>
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!sunqbc.risq.qc.ca!novia!novia!sequencer.newscene.com!not-for-mail
Newsgroups: news.software.nntp
Lines: 58
X-Newsreader: Forte Agent 1.8/32.553 trialware
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit