Article View: news.software.nntp
Article #56700Re: [yEnc] some newbie questions
From: Curt Welch
Date: Wed, 20 Feb 2002 23:45
Date: Wed, 20 Feb 2002 23:45
34 lines
2923 bytes
2923 bytes
Liyang Hu <newsgroups@nerv.cx> wrote: > Right ... we've just agreed that it would be best if the input > stream is random (due to compression). Care to list some `common' > byte sequences? No, idealy you don't want it random. You want it skewed away from the special characters. You want it to contain no NULLs, CR, LFs etc. > To avoid the `complexity' of borrowing zlib code, the other solution > is to just mix (XOR or add) the input data with a pseudo-random > sequence. A simple random number generator (with a fixed seed) is > sufficient to ensure that statistically, we've little or no skew in > the character distribution. If the data is already skewed, it's better to use the skew to your advantage than it is to randomize it with XOR. If a dataset is skewed to contain more NULLs, then that means it's also likely to contain less of every other character than a random dataset of the same size would contain. i,e. it's skewed. And in that case, shifting the skew away from NULL will be a better solution that randomizing the data. I don't know if the +42 shift is actaully better for typical usenet data than an XOR, but if I had to pick, I'd bet that the +42 shift worked out on average to be better. And it's simpler as well. The XOR trick has the nice effect of reducing the probability of a worse case, but worse case problems with the +42 shift are likely to be totaly unimportant anyway so doing something to reduce the odds further isn't likely to have enough value to justify. -- Curt Welch http://CurtWelch.Com/ curt@kcwc.com Webmaster for http://NewsReader.Com/
Technical Details
Message-ID:
<20020220184514.141$L4@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!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!jfk3-feed1.news.digex.net!dca6-feed2.news.digex.net!intermedia!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mailReferences:
<3c6e6798.9093644@news> <a4kc41$ou1$2@pegasus.csx.cam.ac.uk> <3c702e8c.7007252@news> <a4pknt$4pg$2@pegasus.csx.cam.ac.uk> <1rn0y77ebu.fsf@sex.ifi.uio.no> <a4pq59$a4e$1@pegasus.csx.cam.ac.uk>Show Full Headers
Complete Article Headers
Message-ID: <20020220184514.141$L4@newsreader.com>
Subject: Re: [yEnc] some newbie questions
Date: Wed, 20 Feb 2002 23:45:14 +0000
From: curt@kcwc.com (Curt Welch)
References: <3c6e6798.9093644@news> <a4kc41$ou1$2@pegasus.csx.cam.ac.uk> <3c702e8c.7007252@news> <a4pknt$4pg$2@pegasus.csx.cam.ac.uk> <1rn0y77ebu.fsf@sex.ifi.uio.no> <a4pq59$a4e$1@pegasus.csx.cam.ac.uk>
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!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!jfk3-feed1.news.digex.net!dca6-feed2.news.digex.net!intermedia!newsfeed1.cidera.com!Cidera!feed2.newsreader.com!news2.newsreader.com!ellis.newsreader.com!not-for-mail
Organization: NewsReader.Com
Newsgroups: news.software.nntp
X-Trace: NewsReader.Com e,g7oalitpqnbD.jrCoZti1hALIQpNkoNVV@5g_maSXW3wl/
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