🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #23912

Re: NNTP Compression (was Re: Feed external process from Diablo?)

#23912
From: Christopher Sedore
Date: Tue, 02 Dec 1997 00:00
60 lines
3044 bytes

> -----Original Message-----
> From:	Jeff Garzik 
> Subject:	NNTP Compression (was Re: Feed external process from
> Diablo?)
> 
> Christopher Sedore wrote:
> > I use the same compression as gzip (from zlib).  I simply do a "mode
> > compress" after the mode stream, and do compression if I get a 203
> > response code (sometime later I should change to a new code).  Even
> the
> > streaming commands compress reasonably well (1.5:1 or 2:1 typically)
> 
> There's a smidgen of code that does this lying around my project
> directories, remarkably like what you describe here.
> 
> It's basically a TCP redirector, with compression.  It's probably
> generic enough to work with any lock-step text protocol, NNTP, SMTP,
> whatever.
> 
> After issuing a MODE COMPRESS (that's what I called it too), the
> upstream site breaks a conversation into compression packets before it
> sends to the remote.  I use zlib compression too (isn't it nice?).
> For
> each NNTP command, I send
> 
> 			magic number (network long, 0xBEDAC0ED :) )
> 			length of gzipped packet (network long)
> gzip stream begins	NNTP protocol command
> 			NNTP data (article, LIST ACTIVE, ...)
> gzip stream ends	NNTP protocol terminator (.)
> 
> The turnaround time for CHECKs is pretty good, considering that each
> CHECK is individually compressed and decompressed.
> 
I don't packetize my data, I simply flush the compressor for each
"atomic" transaction.  This gets maximum compression benefit and lowest
CPU utilization.  So far, most of my testing has been done via
modem/PPP, so turnaround hasn't been a real problem. :)

> The downstream site's responses are not compressed at all.
> 
Same here.

> The only downside is that you lost per-site granularity when using a
> TCP
> redirector...  it would be better if something like this made it into
> the core news router engines...  And make sure you default the feature
> to OFF.  :)
> 
After a bit of hacking this evening, I got diablo 1.14 to receive
compressed streams from NNTPRelay.  I'm looking into having diablo
generate them, too, but it isn't quite as easy.

-Chris



Technical Details
Message-ID: <4E86915F977FD0119BCD08002BE28C4B0669DC@exchange.maxwell.syr.edu>
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!not-for-mail
References: <65v4k2$olp$1@roch.zetnet.co.uk> <65v91g$1jvm$1@newssvr03-int.news.prodigy.com> <4E86915F977FD0119BCD08002BE28C4B065DCE@exchange.maxwell.syr.edu> <65vl4i$nav$1@vixen.cso.uiuc.edu> <4E86915F977FD0119BCD08002BE28C4B065F9C@exchange.maxwell.syr.edu> <3483AF60.70402EBD@spinne.com>

Show Full Headers
Complete Article Headers
Message-ID: <4E86915F977FD0119BCD08002BE28C4B0669DC@exchange.maxwell.syr.edu>
Subject: Re: NNTP Compression (was Re: Feed external process from Diablo?)
Date: Tue, 02 Dec 1997 00:00:00 +0000
From: Christopher Sedore <cmsedore@maxwell.syr.edu>
References: <65v4k2$olp$1@roch.zetnet.co.uk> <65v91g$1jvm$1@newssvr03-int.news.prodigy.com> <4E86915F977FD0119BCD08002BE28C4B065DCE@exchange.maxwell.syr.edu> <65vl4i$nav$1@vixen.cso.uiuc.edu> <4E86915F977FD0119BCD08002BE28C4B065F9C@exchange.maxwell.syr.edu> <3483AF60.70402EBD@spinne.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!not-for-mail
X-Deja-AN: 294699370
Sender: Christopher Sedore <cmsedore@maxwell.syr.edu>
Newsgroups: news.software.nntp