🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #57970

Re: A better way to post binaries

#57970
From: Jeremy
Date: Sun, 07 Apr 2002 07:56
34 lines
2572 bytes
J.B. Moreno <planb@newsreaders.com> wrote:

>> As for harm, now that I'm actually writing the code, I am realizing
>> what an enormous pain in the ass it is to have to include those stupid
>> headers in the encoded data, because it makes it essentially
>> impossible to implement encoding as a standalone module processing a
>> datastream.  I now *really* want to get rid of those stupid things the
>> very minute they aren't absolutely necessary anymore.
> 
> Huh?  It ought to be pretty simple from either direction  -- if
> encoding, spit them out before/after and then go on to the rest of the
> data, for decoding, simply use "=y" as a signal meaning "read to end of
> line".

Well, if you're writing a module which simply takes a stream on input
and sends back an encoded stream, you have to wait until you have all
of the data before you write any output, because until you do, you don't
know the size.  Which has the additional downside that you have to store
all of the encoded data, rather than discarding it as you process it, so
you've either got the entire encoded file in another memory buffer, or
you have to use tempfiles or something like that.  You also have to have
a way to get the filename into the module.

It'll get worse with multiparts, because the stuff that has to go into
the =ypart line simply won't be available to such a module, so you have
to go and change the API from "send a stream, get back an encoded stream"
to something else.

Decoding is no problem, because you can completely ignore the parameters
in the various =y lines and just treat the thing as a stream.

-- 
Jeremy  |  jeremy@exit109.com
Technical Details
Message-ID: <1018166203.925720@ok-corral.gunslinger.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!sn-xit-02!supernews.com!saloon!newsbastard
References: <1017777829.201228@ok-corral.gunslinger.net> <a8m05q$t53tq$1@ID-26705.news.dfncis.de> <1018133305.356462@ok-corral.gunslinger.net> <060420022326598175%planb@newsreaders.com>

Show Full Headers
Complete Article Headers
Message-ID: <1018166203.925720@ok-corral.gunslinger.net>
Subject: Re: A better way to post binaries
Date: Sun, 07 Apr 2002 07:56:43 +0000
From: Jeremy <jeremy@exit109.com>
References: <1017777829.201228@ok-corral.gunslinger.net> <a8m05q$t53tq$1@ID-26705.news.dfncis.de> <1018133305.356462@ok-corral.gunslinger.net> <060420022326598175%planb@newsreaders.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!sn-xit-02!supernews.com!saloon!newsbastard
Newsgroups: news.software.nntp
Organization: There Is No Organization
Lines: 33
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Newsreader: trn 4.0-test76 (Apr 2, 2001)
X-Meow: Meow