🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #53505

Re: Header compression - necessary, useful, senseless ?

#53505
From: Curt Welch
Date: Fri, 27 Jul 2001 16:00
34 lines
2748 bytes
archiver@i3w.com (The Archiver) wrote:
> curt@kcwc.com (Curt Welch) wrote:
>
> >> Why? It would be easier to declare the lenght of the compressed data
> >> before transmitting it unescaped.
> >
> >For that to work you would have to pre-compress all the headers to
> >calculate the length before you could start sending the first byte -
> >before you could even send the response since the size would most likely
> >be included in the response line.  That would suck big time.  You need
> >to compress and send the headers as you read them.
>
> Most compressing algortihms I've seen yet are based on a block of data.
> So perhaps 4-64 kBytes are compressed - and then moved to the
> 'out-queue'. Such a compressed block might be sent out with a length
> byte.

You could also simply send the data in blocks with a block size included
before each block.  So the binary data stream starts with a two byte
block size, then N bytes of data, and keeps repeating like that until
done.  The last size will be a zero lengh byte to mark the end.

Id still rather just stick with the NNTP standard of CR LF DOT to mark
the end and DOT stuffing inside the stream.

Anyone that needs to read data from an NNTP stream allready has code
to do the above.  And if they were smart, it was writen to deal with
binary data already.  So there's no change required to read the
compressed data.

-- 
Curt Welch                                            http://CurtWelch.Com/
curt@kcwc.com                          Webmaster for http://NewsReader.Com/
Technical Details
Message-ID: <20010727120040.184$4k@newsreader.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!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!feed1.newsreader.com!news2.newsreader.com!flame.newsreader.com!not-for-mail
References: <3009e.q71214@archiver.winews.net> <20010726131654.725$7w@newsreader.com> <0t3b605fdfi155bn3e9%md@wonderland.linux.it> <20010726175821.025$Hd@newsreader.com> <4112a.r71201@archiver.winews.net>

Show Full Headers
Complete Article Headers
Message-ID: <20010727120040.184$4k@newsreader.com>
Subject: Re: Header compression - necessary, useful, senseless ?
Date: Fri, 27 Jul 2001 16:00:40 +0000
From: curt@kcwc.com (Curt Welch)
References: <3009e.q71214@archiver.winews.net> <20010726131654.725$7w@newsreader.com> <0t3b605fdfi155bn3e9%md@wonderland.linux.it> <20010726175821.025$Hd@newsreader.com> <4112a.r71201@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!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed1.cidera.com!feed1.newsreader.com!news2.newsreader.com!flame.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com LKlph+SRoO/z9,78LpgNz+qSF-w0B_z0k0Y9Z9q0Jc9Bu@N
X-Face: "p}G*1KH{+F7EYGKLb>ogDguabZ+%,?^epeFB!nzu`)`$=QcvL1KF6<0GH!Tbc!Sqo[|tV5
  %IW48mQf3K=Ci&gZ7]]aazx@]Y-nq!r5{yH/#,?@lDdUDvOfByB2hVW0.@OM%{l/{cT'{w
X-Url: http://CurtWelch.Com/
User-Agent: NewsReader.Com
Lines: 33