Article View: news.software.nntp
Article #53559Re: Header compression - necessary, useful, senseless ?
From: Curt Welch
Date: Mon, 30 Jul 2001 14:57
Date: Mon, 30 Jul 2001 14:57
54 lines
3882 bytes
3882 bytes
archiver@i3w.com (The Archiver) wrote: > curt@kcwc.com (Curt Welch) wrote: > > >> 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. > > Yes, this seems to be a good way. > > >Id still rather just stick with the NNTP standard of CR LF DOT to mark > >the end and DOT stuffing inside the stream. > > Sorry, but I definitely do not agree with you: > Modifying compression algortihms to fit into such a scheme is a hard > work. I think you are confused. There's no need to modify the compresion algorithm with either scheme. I only brought that idea up as something to think about. With both ideas (standard NNTP data enocoding, or non-standard block-length encoding) you are still forced to modify the data stream after it comes out of the compressor. With one, you are inserting byte counts and a NUL NUL CR LF end marker. With the other you are inserting DOTs, and a CR LF DOT CR LF end marker. There's really very little difference other than the fact that one is the NNTP standard and the other isn't. On top of that, I suspect the DOT stuffing would tend to produce less output since you only need to insert the DOT if you see the three character sequence CR LF DOT in the data stream - and the odds of that showing up in a compressed data stream are 1 out of 2 ^ 24. The byte count system would tend to be easier to code, both for the sending side and the receiving side - simply because it fits better with the way most people would structure their code (reading and processing blocks of data). If we were creating a new protocol the byte counts would probably be my method of choice. But since we are talking NNTP, and all servers that exist already have send and receive data routines that correctly and effecently deal with the dot stuffing technique, I just see no reason to make it any more complex than it needs to be by introducing a second encoding technique when we already have one that works fine, and saves more bandwidth. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20010730105713.772$dy@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!ellis.newsreader.com!not-for-mailReferences:
<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> <20010727120040.184$4k@newsreader.com> <4215a.u71207@archiver.winews.net>Show Full Headers
Complete Article Headers
Message-ID: <20010730105713.772$dy@newsreader.com>
Subject: Re: Header compression - necessary, useful, senseless ?
Date: Mon, 30 Jul 2001 14:57:13 +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> <20010727120040.184$4k@newsreader.com> <4215a.u71207@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!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com 1uNbo2dE@6Q9rPRPZi1hbETvUT7V_W-Ylpfw=YitkvD8n
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: 53