Article View: news.software.nntp
Article #23878NNTP Compression (was Re: Feed external process from Diablo?)
From: Jeff Garzik
Date: Tue, 02 Dec 1997 00:00
Date: Tue, 02 Dec 1997 00:00
40 lines
2505 bytes
2505 bytes
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. The downstream site's responses are not compressed at all. 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. :) -- Jeff Garzik Typhoon, Cyclone, Diablo, and INN Spinne USENET News Service Fast and efficient news feeds http://www.spinne.com/usenet/ News tuning and consulting
Technical Details
Message-ID:
<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-mailReferences:
<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>Show Full Headers
Complete Article Headers
Message-ID: <3483AF60.70402EBD@spinne.com> Subject: NNTP Compression (was Re: Feed external process from Diablo?) Date: Tue, 02 Dec 1997 00:00:00 +0000 From: Jeff Garzik <jeff.garzik@spinne.com> 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> 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: 294430505 NNTP-Posting-Date: Tue, 02 Dec 1997 01:46:20 EST Organization: Spinne http://spinne.com Newsgroups: news.software.nntp